From ba2f4642375874575ccf3f45ed4f91c9ea8c47f1 Mon Sep 17 00:00:00 2001 From: aglkm <39521015+aglkm@users.noreply.github.com> Date: Mon, 4 May 2026 10:54:23 +0300 Subject: [PATCH] fixed thread panic --- src/requests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/requests.rs b/src/requests.rs index d7961d6..e69a5c5 100644 --- a/src/requests.rs +++ b/src/requests.rs @@ -830,7 +830,7 @@ pub async fn get_pubnodes_stats(netstats: Arc>) -> Result<(), an match call_external("get_version", "[]", "1", "foreign", endpoint.clone()).await { Ok(resp) => { - if resp != Value::Null { + if resp != Value::Null && resp["result"]["Ok"].is_null() == false { node.version = resp["result"]["Ok"]["node_version"].as_str().unwrap().to_string(); } }, @@ -842,7 +842,7 @@ pub async fn get_pubnodes_stats(netstats: Arc>) -> Result<(), an match call_external("get_tip", "[]", "1", "foreign", endpoint).await { Ok(resp) => { - if resp != Value::Null { + if resp != Value::Null && resp["result"]["Ok"].is_null() == false { node.height = resp["result"]["Ok"]["height"].to_string(); node.hash = resp["result"]["Ok"]["last_block_pushed"].as_str().unwrap().to_string(); }