reify cold objects on block validation/application

This commit is contained in:
vyzo 2022-02-04 16:19:28 +02:00
parent 929a05e898
commit 73c741f20c

View File

@ -32,6 +32,7 @@ import (
/* inline-gen end */ /* inline-gen end */
"github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/builtin" "github.com/filecoin-project/lotus/chain/actors/builtin"
@ -106,7 +107,7 @@ func (t *TipSetExecutor) ApplyBlocks(ctx context.Context, sm *stmgr.StateManager
LookbackState: stmgr.LookbackStateGetterForTipset(sm, ts), LookbackState: stmgr.LookbackStateGetterForTipset(sm, ts),
} }
return sm.VMConstructor()(ctx, vmopt) return sm.VMConstructor()(blockstore.WithHotView(ctx), vmopt)
} }
runCron := func(vmCron *vm.VM, epoch abi.ChainEpoch) error { runCron := func(vmCron *vm.VM, epoch abi.ChainEpoch) error {