Skip to content

Commit

Permalink
core: fix the order of address in queue (ethereum#24907)
Browse files Browse the repository at this point in the history
reverse the order of address in queue
  • Loading branch information
zhaochonghe authored and cp-wjhan committed Dec 2, 2022
1 parent 2f0e482 commit 29f2f71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/tx_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ func (pool *TxPool) truncateQueue() {
addresses = append(addresses, addressByHeartbeat{addr, pool.beats[addr]})
}
}
sort.Sort(addresses)
sort.Sort(sort.Reverse(addresses))

// Drop transactions until the total is below the limit or only locals remain
for drop := queued - pool.config.GlobalQueue; drop > 0 && len(addresses) > 0; {
Expand Down

0 comments on commit 29f2f71

Please sign in to comment.