Merge pull request #8660 from filecoin-project/fix/issue-8659
[nv16] use network bundle names consistent with the network name
This commit is contained in:
commit
93417fca7d
4
Makefile
4
Makefile
@ -75,7 +75,7 @@ debug: build-devnets
|
|||||||
2k: build-devnets
|
2k: build-devnets
|
||||||
|
|
||||||
calibnet: GOFLAGS+=-tags=calibnet
|
calibnet: GOFLAGS+=-tags=calibnet
|
||||||
calibnet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=calibrationnet
|
calibnet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=calibnet
|
||||||
calibnet: build-devnets
|
calibnet: build-devnets
|
||||||
|
|
||||||
butterflynet: GOFLAGS+=-tags=butterflynet
|
butterflynet: GOFLAGS+=-tags=butterflynet
|
||||||
@ -83,7 +83,7 @@ butterflynet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.Netwo
|
|||||||
butterflynet: build-devnets
|
butterflynet: build-devnets
|
||||||
|
|
||||||
interopnet: GOFLAGS+=-tags=interopnet
|
interopnet: GOFLAGS+=-tags=interopnet
|
||||||
interopnet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=caterpillarnet
|
interopnet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=interopnet
|
||||||
interopnet: build-devnets
|
interopnet: build-devnets
|
||||||
|
|
||||||
lotus: $(BUILD_DEPS)
|
lotus: $(BUILD_DEPS)
|
||||||
|
@ -8,6 +8,21 @@ import (
|
|||||||
|
|
||||||
var NetworkBundle string
|
var NetworkBundle string
|
||||||
|
|
||||||
|
func GetNetworkBundle() string {
|
||||||
|
switch NetworkBundle {
|
||||||
|
case "devnet":
|
||||||
|
return "devnet"
|
||||||
|
case "calibnet", "calibrationnet":
|
||||||
|
return "calibrationnet"
|
||||||
|
case "butterflynet":
|
||||||
|
return "butterflynet"
|
||||||
|
case "interopnet", "caterpillarnet":
|
||||||
|
return "caterpillarnet"
|
||||||
|
default:
|
||||||
|
return "mainnet"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//go:embed bundles.toml
|
//go:embed bundles.toml
|
||||||
var BuiltinActorBundles []byte
|
var BuiltinActorBundles []byte
|
||||||
|
|
||||||
|
@ -72,10 +72,7 @@ func LoadBundle(ctx context.Context, bs blockstore.Blockstore, path string, av a
|
|||||||
|
|
||||||
// utility for blanket loading outside DI
|
// utility for blanket loading outside DI
|
||||||
func FetchAndLoadBundles(ctx context.Context, bs blockstore.Blockstore, bar map[actors.Version]build.Bundle) error {
|
func FetchAndLoadBundles(ctx context.Context, bs blockstore.Blockstore, bar map[actors.Version]build.Bundle) error {
|
||||||
netw := build.NetworkBundle
|
netw := build.GetNetworkBundle()
|
||||||
if netw == "" {
|
|
||||||
netw = "mainnet"
|
|
||||||
}
|
|
||||||
|
|
||||||
path := os.Getenv("LOTUS_PATH")
|
path := os.Getenv("LOTUS_PATH")
|
||||||
if path == "" {
|
if path == "" {
|
||||||
|
@ -25,10 +25,7 @@ func LoadBuiltinActors(lc fx.Lifecycle, mctx helpers.MetricsCtx, r repo.LockedRe
|
|||||||
|
|
||||||
// We can't put it as a dep in inputs causes a stack overflow in DI from circular dependency
|
// We can't put it as a dep in inputs causes a stack overflow in DI from circular dependency
|
||||||
// So we pass it through ldflags instead
|
// So we pass it through ldflags instead
|
||||||
netw := build.NetworkBundle
|
netw := build.GetNetworkBundle()
|
||||||
if netw == "" {
|
|
||||||
netw = "mainnet"
|
|
||||||
}
|
|
||||||
|
|
||||||
for av, bd := range build.BuiltinActorReleases {
|
for av, bd := range build.BuiltinActorReleases {
|
||||||
// first check to see if we know this release
|
// first check to see if we know this release
|
||||||
|
Loading…
Reference in New Issue
Block a user