correctly wrap hotview in the context for compute_state

This commit is contained in:
vyzo 2022-02-04 16:57:08 +02:00
parent 73c741f20c
commit 9d92b6eb92

View File

@ -93,6 +93,7 @@ func (t *TipSetExecutor) ApplyBlocks(ctx context.Context, sm *stmgr.StateManager
partDone() partDone()
}() }()
ctx = blockstore.WithHotView(ctx)
makeVmWithBaseStateAndEpoch := func(base cid.Cid, e abi.ChainEpoch) (*vm.VM, error) { makeVmWithBaseStateAndEpoch := func(base cid.Cid, e abi.ChainEpoch) (*vm.VM, error) {
vmopt := &vm.VMOpts{ vmopt := &vm.VMOpts{
StateBase: base, StateBase: base,
@ -107,7 +108,7 @@ func (t *TipSetExecutor) ApplyBlocks(ctx context.Context, sm *stmgr.StateManager
LookbackState: stmgr.LookbackStateGetterForTipset(sm, ts), LookbackState: stmgr.LookbackStateGetterForTipset(sm, ts),
} }
return sm.VMConstructor()(blockstore.WithHotView(ctx), vmopt) return sm.VMConstructor()(ctx, vmopt)
} }
runCron := func(vmCron *vm.VM, epoch abi.ChainEpoch) error { runCron := func(vmCron *vm.VM, epoch abi.ChainEpoch) error {