Skip to content

Commit

Permalink
fix: lotus-stats: actor code string
Browse files Browse the repository at this point in the history
  • Loading branch information
travisperson authored and magik6k committed Jul 6, 2022
1 parent 75d78de commit b27afb4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tools/stats/points/collect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b27afb4

Please sign in to comment.