diff --git a/chain/vm/fvm.go b/chain/vm/fvm.go index b3190be9d..0262b1baa 100644 --- a/chain/vm/fvm.go +++ b/chain/vm/fvm.go @@ -3,6 +3,7 @@ package vm import ( "bytes" "context" + "sync/atomic" "time" "github.com/ipfs/go-cid" @@ -295,6 +296,7 @@ func NewFVM(ctx context.Context, opts *VMOpts) (*FVM, error) { func (vm *FVM) ApplyMessage(ctx context.Context, cmsg types.ChainMsg) (*ApplyRet, error) { start := build.Clock.Now() + defer atomic.AddUint64(&StatApplied, 1) msgBytes, err := cmsg.VMMessage().Serialize() if err != nil { return nil, xerrors.Errorf("serializing msg: %w", err) @@ -345,6 +347,7 @@ func (vm *FVM) ApplyMessage(ctx context.Context, cmsg types.ChainMsg) (*ApplyRet func (vm *FVM) ApplyImplicitMessage(ctx context.Context, cmsg *types.Message) (*ApplyRet, error) { start := build.Clock.Now() + defer atomic.AddUint64(&StatApplied, 1) msgBytes, err := cmsg.VMMessage().Serialize() if err != nil { return nil, xerrors.Errorf("serializing msg: %w", err)