未验证 提交 5d4512b1 编写于 作者: T timcooijmans 提交者: GitHub

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

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册