mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
core/txpool/legacypool: fix bug
This commit is contained in:
parent
239738be19
commit
29e11ad548
1 changed files with 3 additions and 1 deletions
|
|
@ -336,7 +336,9 @@ func (l *list) Add(tx *types.Transaction, priceBump uint64) (bool, *types.Transa
|
|||
l.totalcost = total
|
||||
|
||||
// Old is being replaced, subtract old cost
|
||||
l.subTotalCost([]*types.Transaction{old})
|
||||
if old != nil {
|
||||
l.subTotalCost([]*types.Transaction{old})
|
||||
}
|
||||
|
||||
// Otherwise overwrite the old transaction with the current one
|
||||
l.txs.Put(tx)
|
||||
|
|
|
|||
Loading…
Reference in a new issue