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:
Maciej Hirsz
2019-11-08 13:36:19 +01:00
committed by GitHub
parent a3b6f6a5a1
commit adbd7cb592
11 changed files with 380 additions and 330 deletions
+6 -2
View File
@@ -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;
}
_ => (),
}