vm: construct CBOR store properly.
This commit is contained in:
parent
f8c3756ac0
commit
38c404e04e
@ -809,12 +809,7 @@ func (cs *ChainStore) GetGenesis() (*types.BlockHeader, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
genb, err := cs.bs.Get(c)
|
return cs.GetBlock(c)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return types.DecodeBlock(genb.RawData())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cs *ChainStore) GetCMessage(c cid.Cid) (types.ChainMsg, error) {
|
func (cs *ChainStore) GetCMessage(c cid.Cid) (types.ChainMsg, error) {
|
||||||
|
@ -149,10 +149,10 @@ func (vm *VM) makeRuntime(ctx context.Context, msg *types.Message, parent *Runti
|
|||||||
rt.Abortf(exitcode.SysErrForbidden, "message execution exceeds call depth")
|
rt.Abortf(exitcode.SysErrForbidden, "message execution exceeds call depth")
|
||||||
}
|
}
|
||||||
|
|
||||||
rt.cst = &cbor.BasicIpldStore{
|
cbb := &gasChargingBlocks{rt.chargeGasFunc(2), rt.pricelist, vm.cst.Blocks}
|
||||||
Blocks: &gasChargingBlocks{rt.chargeGasFunc(2), rt.pricelist, vm.cst.Blocks},
|
cst := cbor.NewCborStore(cbb)
|
||||||
Atlas: vm.cst.Atlas,
|
cst.Atlas = vm.cst.Atlas // associate the atlas.
|
||||||
}
|
rt.cst = cst
|
||||||
|
|
||||||
vmm := *msg
|
vmm := *msg
|
||||||
resF, ok := rt.ResolveAddress(msg.From)
|
resF, ok := rt.ResolveAddress(msg.From)
|
||||||
|
Loading…
Reference in New Issue
Block a user