Skip to content

Commit

Permalink
eth: use maxQueuedTxAnns for to limit the number of transactions anno…
Browse files Browse the repository at this point in the history
…unced (#21419)
  • Loading branch information
timcooijmans committed Aug 6, 2020
1 parent d21303f commit 5d4512b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/peer.go
Expand Up @@ -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:
Expand Down

0 comments on commit 5d4512b

Please sign in to comment.