mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-04-11 04:17:30 +00:00
core/vm: fix refund gas logic
This commit is contained in:
parent
829dc9424f
commit
7f045f6c4c
1 changed files with 1 additions and 1 deletions
|
|
@ -145,7 +145,7 @@ func (c *Contract) RefundGas(err error, gas GasCosts, logger *tracing.Hooks, rea
|
||||||
gas.StateGas += gas.StateGasCharged
|
gas.StateGas += gas.StateGasCharged
|
||||||
gas.StateGasCharged = 0
|
gas.StateGasCharged = 0
|
||||||
}
|
}
|
||||||
if gas.Max() == 0 {
|
if gas.RegularGas == 0 && gas.StateGas == 0 && gas.StateGasCharged == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if logger != nil && logger.OnGasChange != nil && reason != tracing.GasChangeIgnored {
|
if logger != nil && logger.OnGasChange != nil && reason != tracing.GasChangeIgnored {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue