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

reverse the order of address in queue
pull/24908/head
zhaochonghe 3 years ago committed by GitHub
parent 7bcbbbf836
commit 2bfd9a28d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      core/tx_pool.go

@ -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; {

Loading…
Cancel
Save