Remove log of immediate forwardings (#52)
This commit is contained in:
parent
769ba42f85
commit
590e9c289f
|
@ -210,7 +210,12 @@ impl MixNode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn forward(&mut self, message: MixMessage, exclude_node: Option<NodeId>, log: EmissionLog) {
|
fn forward(
|
||||||
|
&mut self,
|
||||||
|
message: MixMessage,
|
||||||
|
exclude_node: Option<NodeId>,
|
||||||
|
log: Option<EmissionLog>,
|
||||||
|
) {
|
||||||
for (i, node_id) in self
|
for (i, node_id) in self
|
||||||
.settings
|
.settings
|
||||||
.connected_peers
|
.connected_peers
|
||||||
|
@ -219,7 +224,9 @@ impl MixNode {
|
||||||
.enumerate()
|
.enumerate()
|
||||||
{
|
{
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
Self::log_emission(&log);
|
if let Some(log) = &log {
|
||||||
|
Self::log_emission(log);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self.network_interface
|
self.network_interface
|
||||||
.send_message(*node_id, message.clone())
|
.send_message(*node_id, message.clone())
|
||||||
|
@ -322,7 +329,7 @@ impl Node for MixNode {
|
||||||
self.forward(
|
self.forward(
|
||||||
network_message.payload().clone(),
|
network_message.payload().clone(),
|
||||||
Some(network_message.from),
|
Some(network_message.from),
|
||||||
self.new_emission_log("ImmediateForwarding"),
|
None,
|
||||||
);
|
);
|
||||||
self.blend_sender
|
self.blend_sender
|
||||||
.send(network_message.into_payload().0)
|
.send(network_message.into_payload().0)
|
||||||
|
@ -362,7 +369,7 @@ impl Node for MixNode {
|
||||||
self.forward(
|
self.forward(
|
||||||
MixMessage(msg),
|
MixMessage(msg),
|
||||||
None,
|
None,
|
||||||
self.new_emission_log("FromPersistent"),
|
Some(self.new_emission_log("FromPersistent")),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue