Skip to content

Commit 46cf79f

Browse files
authored
chore: skip bootstrap address override if LOTUS_P2P_BOOTSTRAPPERS is empty (#12914)
Skip bootstrap address override if `LOTUS_P2P_BOOTSTRAPPERS` is empty Do not parse bootstrapper addresses if it's overridden via `LOTUS_P2P_BOOTSTRAPPERS` with empty value.
1 parent ea29eed commit 46cf79f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/bootstrap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func BuiltinBootstrap() ([]peer.AddrInfo, error) {
2424
if DisableBuiltinAssets {
2525
return nil, nil
2626
}
27-
if bootstrappers, found := os.LookupEnv(BootstrappersOverrideEnvVarKey); found {
27+
if bootstrappers := os.Getenv(BootstrappersOverrideEnvVarKey); bootstrappers != "" {
2828
log.Infof("Using bootstrap nodes overridden by environment variable %s", BootstrappersOverrideEnvVarKey)
2929
return addrutil.ParseAddresses(context.TODO(), strings.Split(strings.TrimSpace(bootstrappers), ","))
3030
}

0 commit comments

Comments
 (0)