modify runtime gasUsed printf
This commit is contained in:
parent
a5c05f87f1
commit
4d9c90ed4a
@ -546,9 +546,10 @@ func (rt *Runtime) chargeGasInternal(gas GasCharge, skip int) aerrors.ActorError
|
||||
|
||||
// overflow safe
|
||||
if rt.gasUsed > rt.gasAvailable-toUse {
|
||||
gasUsed := rt.gasUsed
|
||||
rt.gasUsed = rt.gasAvailable
|
||||
return aerrors.Newf(exitcode.SysErrOutOfGas, "not enough gas: used=%d, available=%d",
|
||||
rt.gasUsed, rt.gasAvailable)
|
||||
return aerrors.Newf(exitcode.SysErrOutOfGas, "not enough gas: used=%d, available=%d, use=%d",
|
||||
gasUsed, rt.gasAvailable, toUse)
|
||||
}
|
||||
rt.gasUsed += toUse
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user