From 74fbc6c2efd33c2101b57993317deaa08bfc126f Mon Sep 17 00:00:00 2001 From: Jochem Brouwer Date: Mon, 28 Apr 2025 22:58:54 +0200 Subject: [PATCH] VM: use correct maxGasLimit --- packages/vm/src/runBlock.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/vm/src/runBlock.ts b/packages/vm/src/runBlock.ts index c2299dc349..c047064219 100644 --- a/packages/vm/src/runBlock.ts +++ b/packages/vm/src/runBlock.ts @@ -659,18 +659,14 @@ async function applyTransactions(vm: VM, block: Block, opts: RunBlockOpts) { const receipts: TxReceipt[] = [] const txResults: RunTxResult[] = [] + const maxGasLimit = block.header.gasLimit + /* * Process transactions */ for (let txIdx = 0; txIdx < block.transactions.length; txIdx++) { const tx = block.transactions[txIdx] - let maxGasLimit - if (vm.common.isActivatedEIP(1559)) { - maxGasLimit = block.header.gasLimit * vm.common.param('elasticityMultiplier') - } else { - maxGasLimit = block.header.gasLimit - } const gasLimitIsHigherThanBlock = maxGasLimit < tx.gasLimit + gasUsed if (gasLimitIsHigherThanBlock) { const msg = _errorMsg('tx has a higher gas limit than the block', vm, block) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy