chain: Better ReadState

This commit is contained in:
Łukasz Magiera
2019-08-16 04:33:59 +02:00
parent 6bee253e33
commit 3327781e60
2 changed files with 33 additions and 8 deletions
+7 -2
View File
@@ -244,8 +244,13 @@ func (a *FullNodeAPI) ChainReadState(ctx context.Context, act *types.Actor, ts *
return nil, err
}
var oif interface{}
if err := state.Store.Get(context.TODO(), act.Head, &oif); err != nil {
blk, err := state.Store.Blocks.GetBlock(ctx, act.Head)
if err != nil {
return nil, err
}
oif, err := vm.DumpActorState(act.Code, blk.RawData())
if err != nil {
return nil, err
}