mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-20 22:11:04 +00:00
Add finalized block info (#104)
This commit is contained in:
@@ -110,6 +110,14 @@ export class Connection {
|
||||
break;
|
||||
}
|
||||
|
||||
case Actions.BestFinalized: {
|
||||
const [finalized /*, hash */] = message.payload;
|
||||
|
||||
this.state = this.update({ finalized });
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case Actions.AddedNode: {
|
||||
const [id, nodeDetails, nodeStats, nodeHardware, blockDetails, location] = message.payload;
|
||||
const pinned = this.pins.has(nodeDetails[0]);
|
||||
@@ -144,6 +152,14 @@ export class Connection {
|
||||
break;
|
||||
}
|
||||
|
||||
case Actions.FinalizedBlock: {
|
||||
const [id, height, hash] = message.payload;
|
||||
|
||||
nodes.mut(id, (node) => node.updateFinalized(height, hash));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case Actions.NodeStats: {
|
||||
const [id, nodeStats] = message.payload;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user