From 27c65d291fc29c6fc7e9b2a1b8971ad1fa4e1506 Mon Sep 17 00:00:00 2001 From: bemevolent <140763712+bemevolent@users.noreply.github.com> Date: Mon, 31 Jul 2023 14:11:31 -0500 Subject: [PATCH] fix: track full_transactions propagation when packet size limited (#3993) --- crates/net/network/src/transactions.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/crates/net/network/src/transactions.rs b/crates/net/network/src/transactions.rs index 8c1db9a03b..55c434593e 100644 --- a/crates/net/network/src/transactions.rs +++ b/crates/net/network/src/transactions.rs @@ -267,12 +267,17 @@ where // send hashes of transactions self.network.send_transactions_hashes(*peer_id, new_pooled_hashes); } else { - // send full transactions - self.network.send_transactions(*peer_id, full_transactions.build()); + let new_full_transactions = full_transactions.build(); - for hash in new_pooled_hashes.into_iter_hashes() { - propagated.0.entry(hash).or_default().push(PropagateKind::Full(*peer_id)); + for tx in new_full_transactions.iter() { + propagated + .0 + .entry(tx.hash()) + .or_default() + .push(PropagateKind::Full(*peer_id)); } + // send full transactions + self.network.send_transactions(*peer_id, new_full_transactions); } } }