From 7f045f6c4c19c0f8d192984ef02b461d34b047de Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Tue, 10 Mar 2026 17:44:00 +0100 Subject: [PATCH] core/vm: fix refund gas logic --- core/vm/contract.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/vm/contract.go b/core/vm/contract.go index 5393960bc6..9aac8dcb03 100644 --- a/core/vm/contract.go +++ b/core/vm/contract.go @@ -145,7 +145,7 @@ func (c *Contract) RefundGas(err error, gas GasCosts, logger *tracing.Hooks, rea gas.StateGas += gas.StateGasCharged gas.StateGasCharged = 0 } - if gas.Max() == 0 { + if gas.RegularGas == 0 && gas.StateGas == 0 && gas.StateGasCharged == 0 { return } if logger != nil && logger.OnGasChange != nil && reason != tracing.GasChangeIgnored {