Fix bug, buffered hashes of different eth versions from same peer (#6139)

This commit is contained in:
Emilia Hane
2024-01-20 07:28:04 +01:00
committed by GitHub
parent 48d07eddb4
commit 51b40a029d

View File

@@ -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:#}"),