mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-03 13:38:39 +00:00
core/txpool/blobpool: return error on underpriced
This also solves a forwarding issue, where underpriced transactions were announced. Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
0d13437991
commit
e9d185f15b
1 changed files with 8 additions and 0 deletions
|
|
@ -1676,6 +1676,14 @@ func (p *BlobPool) addLocked(tx *types.Transaction, checkGapped bool) (err error
|
||||||
}
|
}
|
||||||
p.updateStorageMetrics()
|
p.updateStorageMetrics()
|
||||||
|
|
||||||
|
// If we've just dropped the added transaction, it was clearly underpriced.
|
||||||
|
// We could also try to check for this earlier, but it is compex because
|
||||||
|
// of the rolling fee caculations.
|
||||||
|
if !p.lookup.exists(tx.Hash()) {
|
||||||
|
addUnderpricedMeter.Mark(1)
|
||||||
|
return txpool.ErrUnderpriced
|
||||||
|
}
|
||||||
|
|
||||||
addValidMeter.Mark(1)
|
addValidMeter.Mark(1)
|
||||||
|
|
||||||
// Notify all listeners of the new arrival
|
// Notify all listeners of the new arrival
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue