mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-28 08:37:58 +00:00
Fix network ID and validator icons (#189)
* fix: Validator icons * fix: Propagation time for blocks < highest * fix: Reintroduce network_id to Rust backend
This commit is contained in:
@@ -204,7 +204,7 @@ impl Handler<UpdateNode> for Chain {
|
||||
let UpdateNode { nid, msg, raw } = msg;
|
||||
|
||||
if let Some(block) = msg.details.best_block() {
|
||||
let mut propagation_time = 0;
|
||||
let mut propagation_time = None;
|
||||
let now = now();
|
||||
|
||||
self.update_stale_nodes(now);
|
||||
@@ -224,7 +224,7 @@ impl Handler<UpdateNode> for Chain {
|
||||
self.serializer.push(feed::BestBlock(self.best.height, now, self.average_block_time));
|
||||
} else if block.height == self.best.height {
|
||||
if let Some(timestamp) = self.timestamp {
|
||||
propagation_time = now - timestamp;
|
||||
propagation_time = Some(now - timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,6 +257,10 @@ impl Handler<UpdateNode> for Chain {
|
||||
node.set_network_state(raw);
|
||||
}
|
||||
}
|
||||
Details::AfgAuthoritySet(authority) => {
|
||||
node.set_validator_address(authority.authority_id);
|
||||
return;
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user