Skip to content

Commit d1c5f91

Browse files
authored
core/txpool: use priceList.Put instead of heap.Push (#26863)
Minor refactor to use the 'intended' accessor
1 parent a20e387 commit d1c5f91

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, false)
754753
}
755754
log.Trace("Discarding future transaction replacing pending tx", "hash", hash)
756755
return false, ErrFutureReplacePending

0 commit comments

Comments
 (0)