diff --git a/cmd/lotus-chainwatch/processor/common_actors.go b/cmd/lotus-chainwatch/processor/common_actors.go index f74168485..d6aec7f90 100644 --- a/cmd/lotus-chainwatch/processor/common_actors.go +++ b/cmd/lotus-chainwatch/processor/common_actors.go @@ -16,7 +16,6 @@ import ( _init "github.com/filecoin-project/specs-actors/actors/builtin/init" "github.com/filecoin-project/specs-actors/actors/util/adt" "github.com/ipfs/go-cid" - "github.com/multiformats/go-multihash" typegen "github.com/whyrusleeping/cbor-gen" ) @@ -244,8 +243,8 @@ func (p *Processor) storeActorHeads(actors map[cid.Cid]ActorTips) error { for code, actTips := range actors { actorName := code.String() - if s, err := multihash.Decode(code.Hash()); err != nil { - actorName = string(s.Digest) + if builtin.IsBuiltinActor(code) { + actorName = builtin.ActorNameByCode(code) } for _, actorInfo := range actTips { for _, a := range actorInfo { @@ -290,8 +289,8 @@ func (p *Processor) storeActorStates(actors map[cid.Cid]ActorTips) error { for code, actTips := range actors { actorName := code.String() - if s, err := multihash.Decode(code.Hash()); err != nil { - actorName = string(s.Digest) + if builtin.IsBuiltinActor(code) { + actorName = builtin.ActorNameByCode(code) } for _, actorInfo := range actTips { for _, a := range actorInfo {