Unverified Commit d1c5f918 authored by ucwong's avatar ucwong Committed by GitHub

core/txpool: use priceList.Put instead of heap.Push (#26863)

Minor refactor to use the 'intended' accessor
parent a20e3872
......@@ -17,7 +17,6 @@
package txpool
import (
"container/heap"
"errors"
"fmt"
"math"
......@@ -750,7 +749,7 @@ func (pool *TxPool) add(tx *types.Transaction, local bool) (replaced bool, err e
// Add all transactions back to the priced queue
if replacesPending {
for _, dropTx := range drop {
heap.Push(&pool.priced.urgent, dropTx)
pool.priced.Put(dropTx, false)
}
log.Trace("Discarding future transaction replacing pending tx", "hash", hash)
return false, ErrFutureReplacePending
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment