Skip to content

Commit 1bff85a

Browse files
zhaochonghesadoci
authored andcommitted
core: fix the order of address in queue (ethereum#24907)
reverse the order of address in queue
1 parent 4d964e9 commit 1bff85a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/tx_pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ func (pool *TxPool) truncateQueue() {
15301530
addresses = append(addresses, addressByHeartbeat{addr, pool.beats[addr]})
15311531
}
15321532
}
1533-
sort.Sort(addresses)
1533+
sort.Sort(sort.Reverse(addresses))
15341534

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

0 commit comments

Comments
 (0)