call Executor.Done where appropriate in stmgr uses

This commit is contained in:
vyzo 2023-03-23 17:34:59 +02:00
parent ee6c0f8570
commit 2bb89d9c30
2 changed files with 4 additions and 0 deletions

View File

@ -159,6 +159,8 @@ 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)
}
defer vmi.Done()
for i, m := range priorMsgs {
_, err = vmi.ApplyMessage(ctx, m)
if err != nil {
@ -191,6 +193,7 @@ func (sm *StateManager) callInternal(ctx context.Context, msg *types.Message, pr
vmopt.BaseFee = big.Zero()
vmopt.StateBase = stateCid
vmi.Done()
vmi, err = sm.newVM(ctx, vmopt)
if err != nil {
return nil, xerrors.Errorf("failed to set up estimation vm: %w", err)

View File

@ -106,6 +106,7 @@ func ComputeState(ctx context.Context, sm *StateManager, height abi.ChainEpoch,
if err != nil {
return cid.Undef, nil, err
}
defer vmi.Done()
for i, msg := range msgs {
// TODO: Use the signed message length for secp messages