From 8461385e0ddef96e550e9c62752f3e7bb3c9baaf Mon Sep 17 00:00:00 2001 From: qu0b Date: Tue, 24 Mar 2026 11:26:33 +0000 Subject: [PATCH] miner: restore GasUsed assignment in applyTransaction The BAL refactoring in 5808d212b removed the line that sets header.GasUsed = gasPool.Used() after each transaction in the miner's applyTransaction. This caused all geth-proposed blocks to have GasUsed=0 in the header, which every other client rejects during validation. --- miner/worker.go | 1 + 1 file changed, 1 insertion(+) diff --git a/miner/worker.go b/miner/worker.go index 41070a1218..1a6e933edc 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -461,6 +461,7 @@ func (miner *Miner) applyTransaction(env *environment, tx *types.Transaction) (* env.accessList.AccumulateMutations(mutations, uint16(env.tcount)+1) env.accessList.AccumulateReads(env.state.Reader().(state.StateReaderTracker).GetStateAccessList()) } + env.header.GasUsed = env.gasPool.Used() return receipt, err }