Skip to content

Commit f9bf8c0

Browse files
dadegbulgakovk
authored andcommitted
eth/protocols/eth: fix slice resize flaw (ethereum#22181)
1 parent 11b0ca5 commit f9bf8c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eth/protocols/eth/broadcast.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func (p *Peer) announceTransactions() {
179179
queue = append(queue, hashes...)
180180
if len(queue) > maxQueuedTxAnns {
181181
// Fancy copy and resize to ensure buffer doesn't grow indefinitely
182-
queue = queue[:copy(queue, queue[len(queue)-maxQueuedTxs:])]
182+
queue = queue[:copy(queue, queue[len(queue)-maxQueuedTxAnns:])]
183183
}
184184

185185
case <-done:

0 commit comments

Comments
 (0)