From abe23523c4b64c9020a12efc2cee9a98678a32a9 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Wed, 22 Apr 2026 12:11:41 +0200 Subject: [PATCH] core/vm: fix ordering (8037 --- core/vm/evm.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/vm/evm.go b/core/vm/evm.go index f7d0d64d77..de397a3e8e 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -322,8 +322,8 @@ func (evm *EVM) Call(caller common.Address, addr common.Address, input []byte, g if evm.Config.Tracer != nil && evm.Config.Tracer.OnGasChange != nil { evm.Config.Tracer.OnGasChange(gas.RegularGas, 0, tracing.GasChangeCallFailedExecution) } - gas.Exhaust() gasUsed.RegularGas += gas.RegularGas + gas.Exhaust() } } return ret, gas, gasUsed, err @@ -379,8 +379,8 @@ func (evm *EVM) CallCode(caller common.Address, addr common.Address, input []byt if evm.Config.Tracer != nil && evm.Config.Tracer.OnGasChange != nil { evm.Config.Tracer.OnGasChange(gas.RegularGas, 0, tracing.GasChangeCallFailedExecution) } - gas.Exhaust() gasUsed.RegularGas += gas.RegularGas + gas.Exhaust() } } return ret, gas, gasUsed, err @@ -429,8 +429,8 @@ func (evm *EVM) DelegateCall(originCaller common.Address, caller common.Address, if evm.Config.Tracer != nil && evm.Config.Tracer.OnGasChange != nil { evm.Config.Tracer.OnGasChange(gas.RegularGas, 0, tracing.GasChangeCallFailedExecution) } - gas.Exhaust() gasUsed.RegularGas += gas.RegularGas + gas.Exhaust() } } return ret, gas, gasUsed, err @@ -478,8 +478,8 @@ func (evm *EVM) StaticCall(caller common.Address, addr common.Address, input []b if evm.Config.Tracer != nil && evm.Config.Tracer.OnGasChange != nil { evm.Config.Tracer.OnGasChange(gas.RegularGas, 0, tracing.GasChangeCallFailedExecution) } - gas.Exhaust() gasUsed.RegularGas += gas.RegularGas + gas.Exhaust() } } return ret, gas, gasUsed, err