core: fix the order of address in queue (#24907)

reverse the order of address in queue
This commit is contained in:
zhaochonghe authored and GitHub committed 2022-05-19 15:25:22 +08:00
1 parent 7bcbbbf836
commit 2bfd9a28d1
1 file changed
+1 -1
+1 -1
View File
@@ -1476,7 +1476,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; {