From 7ab5929da109281ab6ee54284deab494751c7414 Mon Sep 17 00:00:00 2001 From: ucwong Date: Sun, 12 Mar 2023 02:39:00 +0800 Subject: [PATCH] core/txpool/txpool.go : used priceList.Put instead of heap.Push --- core/txpool/txpool.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index 4306d5aee6f5..08c872e8b429 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -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, local || pool.locals.containsTx(dropTx)) } log.Trace("Discarding future transaction replacing pending tx", "hash", hash) return false, ErrFutureReplacePending