revert dead code

This commit is contained in:
vyzo 2023-03-30 18:11:44 +03:00
parent bc7dafc3ba
commit 54a80a8a97
3 changed files with 3 additions and 7 deletions

View File

@ -192,7 +192,6 @@ func (t *TipSetExecutor) ApplyBlocks(ctx context.Context,
cronGas = 0
partDone = metrics.Timer(ctx, metrics.VMApplyMessages)
// TODO reorg the code to minimize the execution critical section
vmi, err := makeVm(pstate, epoch, ts.MinTimestamp())
if err != nil {
return cid.Undef, cid.Undef, xerrors.Errorf("making vm: %w", err)
@ -259,7 +258,7 @@ func (t *TipSetExecutor) ApplyBlocks(ctx context.Context,
return cid.Cid{}, cid.Cid{}, err
}
vmDoCron := partDone()
vmCron := partDone()
partDone = metrics.Timer(ctx, metrics.VMApplyFlush)
rectarr := blockadt.MakeEmptyArray(sm.ChainStore().ActorStore(ctx))
@ -298,7 +297,7 @@ func (t *TipSetExecutor) ApplyBlocks(ctx context.Context,
vmFlush := partDone()
partDone = func() time.Duration { return time.Duration(0) }
log.Infow("ApplyBlocks stats", "early", vmEarly, "earlyCronGas", earlyCronGas, "vmMsg", vmMsg, "msgGas", msgGas, "vmCron", vmDoCron, "cronGas", cronGas, "vmFlush", vmFlush, "epoch", epoch, "tsk", ts.Key())
log.Infow("ApplyBlocks stats", "early", vmEarly, "earlyCronGas", earlyCronGas, "vmMsg", vmMsg, "msgGas", msgGas, "vmCron", vmCron, "cronGas", cronGas, "vmFlush", vmFlush, "epoch", epoch, "tsk", ts.Key())
stats.Record(ctx, metrics.VMSends.M(int64(atomic.LoadUint64(&vm.StatSends))),
metrics.VMApplied.M(int64(atomic.LoadUint64(&vm.StatApplied))))

View File

@ -159,7 +159,6 @@ func (sm *StateManager) callInternal(ctx context.Context, msg *types.Message, pr
if err != nil {
return nil, xerrors.Errorf("failed to set up vm: %w", err)
}
for i, m := range priorMsgs {
_, err = vmi.ApplyMessage(ctx, m)
if err != nil {

View File

@ -26,9 +26,7 @@ const (
DefaultPriorityExecutionLanes = 2
)
var ErrExecutorDone = errors.New("executor has been released")
// the execution environment; see below for definition, methods, and initilization
// the execution environment; see below for definition, methods, and initialization
var execution *executionEnv
// implementation of vm executor with simple sanity check preventing use after free.