From 51b40a029d40a83ce1f1d3cdc6f8b536ea212518 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Sat, 20 Jan 2024 07:28:04 +0100 Subject: [PATCH] Fix bug, buffered hashes of different eth versions from same peer (#6139) --- crates/net/network/src/transactions/fetcher.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/net/network/src/transactions/fetcher.rs b/crates/net/network/src/transactions/fetcher.rs index 587774f1cd..bf1f0fa104 100644 --- a/crates/net/network/src/transactions/fetcher.rs +++ b/crates/net/network/src/transactions/fetcher.rs @@ -466,7 +466,7 @@ impl TransactionFetcher { ); for hash in self.buffered_hashes.iter() { - // if this request is eth68 txns, check the size metadata + // if this request is for eth68 txns... if let Some(acc_size_response) = acc_eth68_size.as_mut() { if *acc_size_response >= MAX_FULL_TRANSACTIONS_PACKET_SIZE { trace!( @@ -481,7 +481,10 @@ impl TransactionFetcher { break } - if !self.include_eth68_hash(acc_size_response, *hash) { + // ...and this buffered hash is for an eth68 tx, check the size metadata + if self.eth68_meta.get(hash).is_some() && + !self.include_eth68_hash(acc_size_response, *hash) + { trace!( target: "net::tx", peer_id=format!("{peer_id:#}"),