Skip to content

Commit 7ab5929

Browse files
committed
core/txpool/txpool.go : used priceList.Put instead of heap.Push
1 parent 4930614 commit 7ab5929

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/txpool/txpool.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package txpool
1818

1919
import (
20-
"container/heap"
2120
"errors"
2221
"fmt"
2322
"math"
@@ -750,7 +749,7 @@ func (pool *TxPool) add(tx *types.Transaction, local bool) (replaced bool, err e
750749
// Add all transactions back to the priced queue
751750
if replacesPending {
752751
for _, dropTx := range drop {
753-
heap.Push(&pool.priced.urgent, dropTx)
752+
pool.priced.Put(dropTx, local || pool.locals.containsTx(dropTx))
754753
}
755754
log.Trace("Discarding future transaction replacing pending tx", "hash", hash)
756755
return false, ErrFutureReplacePending

0 commit comments

Comments
 (0)