mirror of
https://github.com/transatoshi-mw/grin-explorer.git
synced 2025-10-21 13:33:41 +00:00
show warn message if node is less than 533
This commit is contained in:
@@ -162,7 +162,14 @@ pub async fn get_status(dashboard: Arc<Mutex<Dashboard>>) -> Result<(), anyhow::
|
|||||||
data.kernel_mmr_size = resp2["result"]["Ok"]["header"]["kernel_mmr_size"].to_string();
|
data.kernel_mmr_size = resp2["result"]["Ok"]["header"]["kernel_mmr_size"].to_string();
|
||||||
}
|
}
|
||||||
|
|
||||||
data.chain = resp1["result"]["Ok"]["chain"].as_str().unwrap().to_string();
|
if resp1["result"]["Ok"]["chain"] == Value::Null {
|
||||||
|
if data.chain.is_empty() {
|
||||||
|
warn!("update grin node to version 5.3.3 or later");
|
||||||
|
data.chain = "unknown".to_string();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
data.chain = resp1["result"]["Ok"]["chain"].as_str().unwrap().to_string();
|
||||||
|
}
|
||||||
data.height = resp1["result"]["Ok"]["tip"]["height"].to_string();
|
data.height = resp1["result"]["Ok"]["tip"]["height"].to_string();
|
||||||
data.sync = resp1["result"]["Ok"]["sync_status"].as_str().unwrap().to_string();
|
data.sync = resp1["result"]["Ok"]["sync_status"].as_str().unwrap().to_string();
|
||||||
data.node_ver = resp1["result"]["Ok"]["user_agent"].as_str().unwrap().to_string();
|
data.node_ver = resp1["result"]["Ok"]["user_agent"].as_str().unwrap().to_string();
|
||||||
|
Reference in New Issue
Block a user