mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +00:00
nit: flush gas on error path
This commit is contained in:
parent
7e3448b177
commit
444dbeb623
1 changed files with 4 additions and 0 deletions
|
|
@ -406,6 +406,10 @@ func (evm *EVM) runExperimental(contract *Contract, stack *Stack, mem *Memory, c
|
|||
|
||||
case PUSH0:
|
||||
if !evm.chainRules.IsShanghai {
|
||||
if contract.Gas < gasUsed {
|
||||
return nil, ErrOutOfGas
|
||||
}
|
||||
contract.Gas -= gasUsed
|
||||
return nil, &ErrInvalidOpCode{opcode: op}
|
||||
}
|
||||
gasUsed += GasQuickStep
|
||||
|
|
|
|||
Loading…
Reference in a new issue