From 39402ea8d35188d694ad4c8289925b0607a20452 Mon Sep 17 00:00:00 2001 From: jangko Date: Sun, 25 Jun 2023 08:27:15 +0700 Subject: [PATCH] EIP-4844: gasCost regression in validateTx due to rebase conflict mishandled --- nimbus/core/validate.nim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nimbus/core/validate.nim b/nimbus/core/validate.nim index b7492ad650..ff027b07d9 100644 --- a/nimbus/core/validate.nim +++ b/nimbus/core/validate.nim @@ -300,10 +300,7 @@ proc validateTransaction*( $tx.maxFee, $tx.maxPriorityFee]) # the signer must be able to fully afford the transaction - let gasCost = if tx.txType >= TxEip1559: - tx.gasLimit.u256 * tx.maxFee.u256 - else: - tx.gasLimit.u256 * tx.gasPrice.u256 + let gasCost = tx.gasCost() if balance < gasCost: return err("invalid tx: not enough cash for gas. avail=$1, require=$2" % [