core/txpool/legacypool: fix bug

This commit is contained in:
MariusVanDerWijden 2025-09-10 11:33:38 +02:00
parent 239738be19
commit 29e11ad548

View file

@ -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
if old != nil {
l.subTotalCost([]*types.Transaction{old})
}
// Otherwise overwrite the old transaction with the current one
l.txs.Put(tx)