EIP-4844: gasCost regression in validateTx due to rebase conflict mishandled

This commit is contained in:
jangko 2023-06-25 08:27:15 +07:00
parent ab4a1a141b
commit 39402ea8d3
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 1 additions and 4 deletions

View File

@ -300,10 +300,7 @@ proc validateTransaction*(
$tx.maxFee, $tx.maxPriorityFee]) $tx.maxFee, $tx.maxPriorityFee])
# the signer must be able to fully afford the transaction # the signer must be able to fully afford the transaction
let gasCost = if tx.txType >= TxEip1559: let gasCost = tx.gasCost()
tx.gasLimit.u256 * tx.maxFee.u256
else:
tx.gasLimit.u256 * tx.gasPrice.u256
if balance < gasCost: if balance < gasCost:
return err("invalid tx: not enough cash for gas. avail=$1, require=$2" % [ return err("invalid tx: not enough cash for gas. avail=$1, require=$2" % [