fix: insufficient gas remaining to cover retval
proceed as in the case of method execution failure.
This commit is contained in:
parent
1e38e02456
commit
c66415ae4c
@ -365,9 +365,17 @@ func (vm *VM) ApplyMessage(ctx context.Context, cmsg types.ChainMsg) (*ApplyRet,
|
|||||||
return nil, xerrors.Errorf("send returned nil runtime, send error was: %s", actorErr)
|
return nil, xerrors.Errorf("send returned nil runtime, send error was: %s", actorErr)
|
||||||
}
|
}
|
||||||
actorErr2 := rt.chargeGasSafe(rt.Pricelist().OnChainReturnValue(len(ret)))
|
actorErr2 := rt.chargeGasSafe(rt.Pricelist().OnChainReturnValue(len(ret)))
|
||||||
if actorErr == nil {
|
if actorErr2 != nil {
|
||||||
//TODO: Ambigous what to do in this case
|
return &ApplyRet{
|
||||||
actorErr = actorErr2
|
MessageReceipt: types.MessageReceipt{
|
||||||
|
ExitCode: aerrors.RetCode(actorErr2),
|
||||||
|
GasUsed: rt.gasUsed,
|
||||||
|
},
|
||||||
|
ActorErr: actorErr2,
|
||||||
|
Penalty: types.NewInt(0),
|
||||||
|
Duration: time.Since(start),
|
||||||
|
}, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user