From 75c68e75fed998d8eb38cbbf95bf6d5a810e98bd Mon Sep 17 00:00:00 2001 From: Lucas Francisco Lopez Date: Thu, 17 Oct 2024 16:47:33 +0200 Subject: [PATCH] Add import to trigger init() lotus build --- actors/actors.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/actors/actors.go b/actors/actors.go index 04b2410..6f0de6f 100644 --- a/actors/actors.go +++ b/actors/actors.go @@ -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 {