From b1e2c750d3a2402a59bc9e8a9a8a1ac00c4cabaa Mon Sep 17 00:00:00 2001 From: aitbc Date: Tue, 19 May 2026 19:14:43 +0200 Subject: [PATCH] Fix node_health to determine based on RPC responsiveness instead of non-existent health endpoint --- website/agent/live_api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/agent/live_api.py b/website/agent/live_api.py index 60be7e82..00f760b1 100644 --- a/website/agent/live_api.py +++ b/website/agent/live_api.py @@ -191,9 +191,10 @@ def get_live_chain_data() -> Dict[str, Any]: def get_live_discovery() -> Dict[str, Any]: """Get live discovery data""" head = rpc_query("head") - health = rpc_query("health") or {} block_height = head.get("height", 0) if head else 0 + # Determine health based on RPC responsiveness + node_health = "healthy" if head else "unhealthy" return { "network": { @@ -202,7 +203,7 @@ def get_live_discovery() -> Dict[str, Any]: "description": "AI-powered blockchain platform", "live_status": { "current_height": block_height, - "node_health": health.get("status", "unknown"), + "node_health": node_health, "last_update": datetime.now(timezone.utc).isoformat() }, "apis": {