From dcf198d09097cb60c74959379a6d37d01ae2b454 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 31 May 2021 15:56:21 +0200 Subject: [PATCH] fix(data_structures): remove misleading "0 votes:" log --- data_structures/src/superblock.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data_structures/src/superblock.rs b/data_structures/src/superblock.rs index 4cc343c44..aa22ff573 100644 --- a/data_structures/src/superblock.rs +++ b/data_structures/src/superblock.rs @@ -129,6 +129,11 @@ impl SuperBlockVotesMempool { .unwrap(); let pos = v.iter().position(|x| *x == old_sbv).unwrap(); v.swap_remove(pos); + + if v.is_empty() { + self.votes_on_each_superblock + .remove(&old_sbv.superblock_hash); + } } self.penalized_identities.insert(pkh); }