cryptonote_protocol: prevent duplicate txs in fluff queue

1. Fix duplicate transaction #9335
2. Add test for cases where there are duplicate transaction in fluff

Co-authored-by: Boog900 <boog900@tutanota.com>
This commit is contained in:
0xFFFC0000
2024-06-05 16:33:15 +00:00
co-authored by Boog900
parent cc73fe7116
commit 32f32453f1
2 changed files with 59 additions and 0 deletions
+2
View File
@@ -396,6 +396,8 @@ namespace levin
for (auto& connection : connections)
{
std::sort(connection.first.begin(), connection.first.end()); // don't leak receive order
connection.first.erase(std::unique(connection.first.begin(), connection.first.end()),
connection.first.end());
make_payload_send_txs(*zone_->p2p, std::move(connection.first), connection.second, zone_->pad_txs, true);
}