mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-17 00:20:39 +00:00
eth/protocols/eth: fix slice resize flaw (#22181)
This commit is contained in:
parent
8d62ee65b2
commit
c76573a97b
1 changed files with 1 additions and 1 deletions
|
|
@ -179,7 +179,7 @@ func (p *Peer) announceTransactions() {
|
|||
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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue