preload manifest in cli
This commit is contained in:
parent
8ea00a3fc0
commit
1366901ded
22
cli/init.go
Normal file
22
cli/init.go
Normal file
@ -0,0 +1,22 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/filecoin-project/lotus/blockstore"
|
||||
"github.com/filecoin-project/lotus/build"
|
||||
"github.com/filecoin-project/lotus/chain/actors"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// preload manifest so that we have the correct code CID inventory for cli since that doesn't
|
||||
// go through CI
|
||||
if len(build.BuiltinActorsV8Bundle()) > 0 {
|
||||
bs := blockstore.NewMemory()
|
||||
|
||||
if err := actors.LoadManifestFromBundle(context.TODO(), bs, actors.Version8, build.BuiltinActorsV8Bundle()); err != nil {
|
||||
panic(fmt.Errorf("error loading actor manifest: %w", err))
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user