From 1f87331fbc58702b812a7b14e65aa7a28776cc46 Mon Sep 17 00:00:00 2001 From: rayoo Date: Mon, 8 Jun 2026 13:02:20 -0700 Subject: [PATCH] eth/protocols/eth: track announced tx hashes only after send (#35122) Co-authored-by: jwasinger --- eth/protocols/eth/peer.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eth/protocols/eth/peer.go b/eth/protocols/eth/peer.go index 0dfd2e41c6..63f93840c3 100644 --- a/eth/protocols/eth/peer.go +++ b/eth/protocols/eth/peer.go @@ -189,9 +189,12 @@ func (p *Peer) AsyncSendTransactions(hashes []common.Hash) { // directly as the queueing (memory) and transmission (bandwidth) costs should // not be managed directly. func (p *Peer) sendPooledTransactionHashes(hashes []common.Hash, types []byte, sizes []uint32) error { + if err := p2p.Send(p.rw, NewPooledTransactionHashesMsg, NewPooledTransactionHashesPacket{Types: types, Sizes: sizes, Hashes: hashes}); err != nil { + return err + } // Mark all the transactions as known, but ensure we don't overflow our limits p.knownTxs.Add(hashes...) - return p2p.Send(p.rw, NewPooledTransactionHashesMsg, NewPooledTransactionHashesPacket{Types: types, Sizes: sizes, Hashes: hashes}) + return nil } // AsyncSendPooledTransactionHashes queues a list of transactions hashes to eventually