server: use IsLocalNetwork check for DNS bootstrapper decision

It should be ok to use IsLocalNetwork here since the
chainreg.ChainDNSSeeds map does not have an entry for either simnet or
regtest.
This commit is contained in:
Elle Mouton
2025-06-27 15:56:18 +02:00
parent 04564977d8
commit bca6c0d115

View File

@@ -3070,9 +3070,11 @@ func initNetworkBootstrappers(s *server) ([]discovery.NetworkPeerBootstrapper, e
}
bootStrappers = append(bootStrappers, graphBootstrapper)
// If this isn't simnet mode, then one of our additional bootstrapping
// sources will be the set of running DNS seeds.
if !s.cfg.Bitcoin.SimNet {
// If this isn't using simnet or regtest mode, then one of our
// additional bootstrapping sources will be the set of running DNS
// seeds.
if !s.cfg.Bitcoin.IsLocalNetwork() {
//nolint:ll
dnsSeeds, ok := chainreg.ChainDNSSeeds[*s.cfg.ActiveNetParams.GenesisHash]
// If we have a set of DNS seeds for this chain, then we'll add