Workaround for 0 gas price estimation

The transaction spammer from Kurtosis estimates the gas price of its
transactions using 'eth_gasPrice'. Our implementation returns 0 when
no transactions have been executed yet, not taking into account the
EIP-1559 block base fee. Force a hardcoded minimum for now to unstuck.
This commit is contained in:
Etan Kissling 2024-05-06 23:05:47 +02:00
parent dbc6d56003
commit 7690b5ad83
No known key found for this signature in database
GPG Key ID: B21DA824C5A3D03D
1 changed files with 3 additions and 0 deletions

View File

@ -76,6 +76,9 @@ proc calculateMedianGasPrice*(chain: CoreDbRef): GasInt
else:
result = prices[middle]
const minGasPrice = 30_000_000_000.GasInt
result = max(result, minGasPrice)
proc unsignedTx*(tx: TransactionArgs, chain: CoreDbRef, defaultNonce: AccountNonce): Transaction
{.gcsafe, raises: [CatchableError].} =
if tx.to.isSome: