Merge pull request #8545 from swift-mx/mx_dev
fix: update StatApplied when fvm apply message
This commit is contained in:
commit
b9750087ce
@ -3,6 +3,7 @@ package vm
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ipfs/go-cid"
|
"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) {
|
func (vm *FVM) ApplyMessage(ctx context.Context, cmsg types.ChainMsg) (*ApplyRet, error) {
|
||||||
start := build.Clock.Now()
|
start := build.Clock.Now()
|
||||||
|
defer atomic.AddUint64(&StatApplied, 1)
|
||||||
msgBytes, err := cmsg.VMMessage().Serialize()
|
msgBytes, err := cmsg.VMMessage().Serialize()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, xerrors.Errorf("serializing msg: %w", err)
|
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) {
|
func (vm *FVM) ApplyImplicitMessage(ctx context.Context, cmsg *types.Message) (*ApplyRet, error) {
|
||||||
start := build.Clock.Now()
|
start := build.Clock.Now()
|
||||||
|
defer atomic.AddUint64(&StatApplied, 1)
|
||||||
msgBytes, err := cmsg.VMMessage().Serialize()
|
msgBytes, err := cmsg.VMMessage().Serialize()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, xerrors.Errorf("serializing msg: %w", err)
|
return nil, xerrors.Errorf("serializing msg: %w", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user