diff --git a/core/vm/operations_acl.go b/core/vm/operations_acl.go index 085b018e4c42..92e97298c232 100644 --- a/core/vm/operations_acl.go +++ b/core/vm/operations_acl.go @@ -230,6 +230,10 @@ func makeSelfdestructGasFn(refundsEnabled bool) gasFunc { // If the caller cannot afford the cost, this change will be rolled back evm.StateDB.AddAddressToAccessList(address) gas = params.ColdAccountAccessCostEIP2929 + + if contract.Gas < gas { + return gas, nil + } } // if empty and transfers value if evm.StateDB.Empty(address) && evm.StateDB.GetBalance(contract.Address()).Sign() != 0 {