Skip to content

Commit

Permalink
Add import to trigger init() lotus build
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslopezf committed Oct 17, 2024
1 parent ef542f7 commit 75c68e7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions actors/actors.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ import (
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/ipfs/go-cid"

// The following import is necessary to ensure that the init() function
// from the lotus build package is invoked.
// In a recent refactor (v1.30.0), some build packages were modularized to reduce
// unnecessary dependencies. As a result, if this package is not explicitly
// imported, its init() will not be triggered, potentially causing issues
// with initialization, such as errors when searching for actorNameByCid.
_ "github.com/filecoin-project/lotus/build"
)

type BuiltinActorsMetadata struct {
Expand Down

0 comments on commit 75c68e7

Please sign in to comment.