2022-05-11 19:45:06 +00:00
|
|
|
package cli
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/filecoin-project/lotus/blockstore"
|
|
|
|
"github.com/filecoin-project/lotus/build"
|
2022-05-12 13:42:00 +00:00
|
|
|
"github.com/filecoin-project/lotus/node/bundle"
|
2022-05-11 19:45:06 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
// preload manifest so that we have the correct code CID inventory for cli since that doesn't
|
|
|
|
// go through CI
|
2022-05-12 13:48:31 +00:00
|
|
|
// TODO loading the bundle in every cli invocation adds some latency; we should figure out a way
|
|
|
|
// to load actor CIDs without incurring this hit.
|
2022-05-11 19:45:06 +00:00
|
|
|
bs := blockstore.NewMemory()
|
|
|
|
|
2022-05-12 13:42:00 +00:00
|
|
|
if err := bundle.FetchAndLoadBundles(context.Background(), bs, build.BuiltinActorReleases); err != nil {
|
2022-05-11 19:45:06 +00:00
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|