mirror of
https://github.com/logos-blockchain/logos-blockchain-simulations.git
synced 2026-01-02 13:13:07 +00:00
Count # of messages broadcasted by each node
This commit is contained in:
parent
29f78e026e
commit
c7d6bd9a56
@ -133,6 +133,7 @@ impl MixNode {
|
||||
node_id: id,
|
||||
mock_counter: 0,
|
||||
step_id: 0,
|
||||
num_messages_broadcasted: 0,
|
||||
},
|
||||
persistent_sender,
|
||||
persistent_update_time_sender,
|
||||
@ -195,7 +196,8 @@ impl Node for MixNode {
|
||||
persistent_sender.send(msg).unwrap();
|
||||
}
|
||||
MixOutgoingMessage::FullyUnwrapped(_) => {
|
||||
//TODO: increase counter and create a tracing event
|
||||
self.state.num_messages_broadcasted += 1;
|
||||
//TODO: create a tracing event
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ pub struct MixnodeState {
|
||||
pub node_id: NodeId,
|
||||
pub mock_counter: usize,
|
||||
pub step_id: usize,
|
||||
pub num_messages_broadcasted: usize,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user