Merge pull request #8977 from filecoin-project/fix/lotus-stats-actor-string
fix: lotus-stats: actor code string
This commit is contained in:
commit
7e7343c3d2
@ -11,7 +11,6 @@ import (
|
||||
lru "github.com/hashicorp/golang-lru"
|
||||
client "github.com/influxdata/influxdb1-client/v2"
|
||||
"github.com/ipfs/go-cid"
|
||||
"github.com/multiformats/go-multihash"
|
||||
"go.opencensus.io/stats"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
@ -20,6 +19,7 @@ import (
|
||||
"github.com/filecoin-project/lotus/api"
|
||||
"github.com/filecoin-project/lotus/build"
|
||||
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||
"github.com/filecoin-project/lotus/chain/actors/builtin"
|
||||
"github.com/filecoin-project/lotus/chain/actors/builtin/power"
|
||||
"github.com/filecoin-project/lotus/chain/actors/builtin/reward"
|
||||
"github.com/filecoin-project/lotus/chain/store"
|
||||
@ -70,12 +70,8 @@ func (c *ChainPointCollector) actorDigest(ctx context.Context, addr address.Addr
|
||||
return "", err
|
||||
}
|
||||
|
||||
dm, err := multihash.Decode(actor.Code.Hash())
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
digest := builtin.ActorNameByCode(actor.Code)
|
||||
|
||||
digest := string(dm.Digest)
|
||||
c.actorDigestCache.Add(addr, digest)
|
||||
|
||||
return digest, nil
|
||||
|
Loading…
Reference in New Issue
Block a user