Merge pull request #10117 from filecoin-project/asr/resolve-TODO
feat: vm: Assert empty object CID when dumping state
This commit is contained in:
commit
2ad9301a6e
@ -291,7 +291,10 @@ func DumpActorState(i *ActorRegistry, act *types.Actor, b []byte) (interface{},
|
||||
|
||||
um := actInfo.vmActor.State()
|
||||
if um == nil {
|
||||
// TODO::FVM @arajasek I would like to assert that we have the empty object here
|
||||
if act.Code != EmptyObjectCid {
|
||||
return nil, xerrors.Errorf("actor with code %s should only have empty object (%s) as its Head, instead has %s", act.Code, EmptyObjectCid, act.Head)
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
if err := um.UnmarshalCBOR(bytes.NewReader(b)); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user