Skip bootstrapping if no peers specified

This commit is contained in:
Aayush Rajasekaran 2021-01-06 16:03:29 -05:00
parent 858994a630
commit 835b84b12a

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
}