Skip to content

Commit

Permalink
core/txpool: use priceList.Put instead of heap.Push (ethereum#26863)
Browse files Browse the repository at this point in the history
Minor refactor to use the 'intended' accessor
  • Loading branch information
ucwong authored and mmsqe committed Dec 7, 2023
1 parent 6ef34ba commit e944d30
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/txpool/txpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package txpool

import (
"container/heap"
"errors"
"fmt"
"math"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e944d30

Please sign in to comment.