From a02f418945d469cf158ab88cacdf6edb62944427 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Wed, 24 Sep 2025 10:34:20 +0800 Subject: [PATCH] eth/fetcher: improve the condition to stall peer in tx fetcher --- eth/fetcher/tx_fetcher.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth/fetcher/tx_fetcher.go b/eth/fetcher/tx_fetcher.go index 3e050320e90..884469d27e8 100644 --- a/eth/fetcher/tx_fetcher.go +++ b/eth/fetcher/tx_fetcher.go @@ -375,9 +375,9 @@ func (f *TxFetcher) Enqueue(peer string, txs []*types.Transaction, direct bool) otherRejectMeter.Mark(otherreject) // If 'other reject' is >25% of the deliveries in any batch, sleep a bit. - if otherreject > addTxsBatchSize/4 { + if otherreject > int64(len(batch)/4) { time.Sleep(200 * time.Millisecond) - log.Debug("Peer delivering stale transactions", "peer", peer, "rejected", otherreject) + log.Debug("Peer delivering invalid transactions", "peer", peer, "rejected", otherreject) } } select {