From 5d4512b11305264505fbf61898ae767ca0bc815b Mon Sep 17 00:00:00 2001 From: timcooijmans Date: Thu, 6 Aug 2020 14:19:00 +0200 Subject: [PATCH] eth: use maxQueuedTxAnns for to limit the number of transactions announced (#21419) --- eth/peer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/peer.go b/eth/peer.go index 468cfb9185..21b82a19c5 100644 --- a/eth/peer.go +++ b/eth/peer.go @@ -262,7 +262,7 @@ func (p *peer) announceTransactions(removePeer func(string)) { queue = append(queue, hashes...) if len(queue) > maxQueuedTxAnns { // Fancy copy and resize to ensure buffer doesn't grow indefinitely - queue = queue[:copy(queue, queue[len(queue)-maxQueuedTxs:])] + queue = queue[:copy(queue, queue[len(queue)-maxQueuedTxAnns:])] } case <-done: