Merge branch 'fix-cache-bug' into demo

This commit is contained in:
Youngjoon Lee 2024-11-09 07:24:56 +07:00
commit 4559cd931c
No known key found for this signature in database
GPG Key ID: 25CA11F37F095E5D
1 changed files with 1 additions and 7 deletions

View File

@ -211,13 +211,6 @@ impl MixNode {
}
fn forward(&mut self, message: MixMessage, exclude_node: Option<NodeId>) {
if self
.message_cache
.cache_set(Self::sha256(&message.0), ())
.is_some()
{
return;
}
for node_id in self
.settings
.connected_peers
@ -227,6 +220,7 @@ impl MixNode {
self.network_interface
.send_message(*node_id, message.clone())
}
self.message_cache.cache_set(Self::sha256(&message.0), ());
}
fn receive(&mut self) -> Vec<NetworkMessage<MixMessage>> {