Merge pull request #195 from naturallaw777/copilot/fix-disabled-bitcoin-tile-sync
Fix disabled Bitcoin tile incorrectly showing "Syncing Timechain" when another variant is active
This commit is contained in:
@@ -1889,7 +1889,7 @@ async def api_services():
|
||||
has_domain_issues = True
|
||||
health = "needs_attention" if (has_port_issues or has_domain_issues) else "healthy"
|
||||
# Check Bitcoin IBD state
|
||||
if unit == "bitcoind.service":
|
||||
if unit == "bitcoind.service" and enabled:
|
||||
sync = await loop.run_in_executor(None, _get_bitcoin_sync_info)
|
||||
if sync and sync.get("initialblockdownload"):
|
||||
health = "syncing"
|
||||
@@ -2127,7 +2127,7 @@ async def api_service_detail(unit: str, icon: str | None = None):
|
||||
has_domain_issues = True
|
||||
health = "needs_attention" if (has_port_issues or has_domain_issues) else "healthy"
|
||||
# Check Bitcoin IBD state
|
||||
if unit == "bitcoind.service":
|
||||
if unit == "bitcoind.service" and enabled:
|
||||
sync = await loop.run_in_executor(None, _get_bitcoin_sync_info)
|
||||
if sync and sync.get("initialblockdownload"):
|
||||
health = "syncing"
|
||||
|
||||
Reference in New Issue
Block a user