Skip to content

Commit

Permalink
Merge pull request #8545 from swift-mx/mx_dev
Browse files Browse the repository at this point in the history
fix: update StatApplied when fvm apply message
  • Loading branch information
magik6k authored May 6, 2022
2 parents c1f1d3d + 6c40d36 commit b975008
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chain/vm/fvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package vm
import (
"bytes"
"context"
"sync/atomic"
"time"

"github.com/ipfs/go-cid"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b975008

Please sign in to comment.