Unverified Commit 5d4512b1 authored by timcooijmans's avatar timcooijmans Committed by GitHub

eth: use maxQueuedTxAnns for to limit the number of transactions announced (#21419)

parent d21303f9
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment