fix: set node process status to alive once syncronized

This commit is contained in:
Cyrix126 2024-10-06 14:19:56 +02:00
parent e8dda5c670
commit 06f8d9bc65

View file

@ -263,6 +263,9 @@ impl Helper {
match PrivNodeApi::request_api(&client, &state).await { match PrivNodeApi::request_api(&client, &state).await {
Ok(priv_api) => { Ok(priv_api) => {
debug!("Node Watchdog | HTTP API request OK, attempting [update_from_priv()]"); debug!("Node Watchdog | HTTP API request OK, attempting [update_from_priv()]");
if priv_api.result.synchronized && priv_api.result.status == "OK" {
lock!(process).state = ProcessState::Alive
}
PubNodeApi::update_from_priv(pub_api, priv_api); PubNodeApi::update_from_priv(pub_api, priv_api);
} }
Err(err) => { Err(err) => {