Merge pull request #5301 from filecoin-project/asr/devnet-fix

Skip bootstrapping if no peers specified
This commit is contained in:
Aayush Rajasekaran 2021-01-08 14:13:47 -05:00 committed by GitHub
commit 92fb48d951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,10 +17,14 @@ func BuiltinBootstrap() ([]peer.AddrInfo, error) {
b := rice.MustFindBox("bootstrap")
spi := b.MustString(BootstrappersFile)
if spi == "" {
return nil, nil
if BootstrappersFile != "" {
spi := b.MustString(BootstrappersFile)
if spi == "" {
return nil, nil
}
return addrutil.ParseAddresses(context.TODO(), strings.Split(strings.TrimSpace(spi), "\n"))
}
return addrutil.ParseAddresses(context.TODO(), strings.Split(strings.TrimSpace(spi), "\n"))
return nil, nil
}