From 32f32453f135104938668b1e59ea8835c0b0169b Mon Sep 17 00:00:00 2001 From: 0xFFFC0000 <0xFFFC0000@proton.me> Date: Wed, 5 Jun 2024 16:33:15 +0000 Subject: 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 --- src/cryptonote_protocol/levin_notify.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/cryptonote_protocol/levin_notify.cpp b/src/cryptonote_protocol/levin_notify.cpp index 1c3a2901c..044fd49b5 100644 --- a/src/cryptonote_protocol/levin_notify.cpp +++ b/src/cryptonote_protocol/levin_notify.cpp @@ -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); } -- cgit v1.2.3