Workaround for disallowed transaction superseding
The transaction spammer from Kurtosis keeps spamming transactions. Because we report the account nonce based on latest rather than pending, multiple transactions with the same nonce are created. To avoid errors from rejecting those, disable the required gas price bump when replacing a transaction with a new nonce.
This commit is contained in:
parent
3dc9b9e71d
commit
7242b4199c
|
@ -80,7 +80,7 @@ proc supersede(xp: TxPoolRef; item: TxItemRef): Result[void,TxInfo]
|
|||
# verify whether replacing is allowed, at all
|
||||
let bumpPrice = (current.tx.gasPrice * xp.priceBump.GasInt + 99) div 100
|
||||
if item.tx.gasPrice < current.tx.gasPrice + bumpPrice:
|
||||
return err(txInfoErrReplaceUnderpriced)
|
||||
discard # return err(txInfoErrReplaceUnderpriced)
|
||||
|
||||
# make space, delete item
|
||||
if not xp.txDB.dispose(current, txInfoSenderNonceSuperseded):
|
||||
|
|
Loading…
Reference in New Issue