eth/protocols/eth: track announced tx hashes only after send (#35122)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

Co-authored-by: jwasinger <j-wasinger@hotmail.com>
This commit is contained in:
rayoo 2026-06-08 13:02:20 -07:00 committed by GitHub
parent e774a8fca0
commit 1f87331fbc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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