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:
Etan Kissling 2024-05-07 00:00:26 +02:00
parent 3dc9b9e71d
commit 7242b4199c
No known key found for this signature in database
GPG Key ID: B21DA824C5A3D03D
1 changed files with 1 additions and 1 deletions

View File

@ -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):