Skip to content

Commit bca6c0d

Browse files
committed
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.
1 parent 0456497 commit bca6c0d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

server.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3070,9 +3070,11 @@ func initNetworkBootstrappers(s *server) ([]discovery.NetworkPeerBootstrapper, e
30703070
}
30713071
bootStrappers = append(bootStrappers, graphBootstrapper)
30723072

3073-
// If this isn't simnet mode, then one of our additional bootstrapping
3074-
// sources will be the set of running DNS seeds.
3075-
if !s.cfg.Bitcoin.SimNet {
3073+
// If this isn't using simnet or regtest mode, then one of our
3074+
// additional bootstrapping sources will be the set of running DNS
3075+
// seeds.
3076+
if !s.cfg.Bitcoin.IsLocalNetwork() {
3077+
//nolint:ll
30763078
dnsSeeds, ok := chainreg.ChainDNSSeeds[*s.cfg.ActiveNetParams.GenesisHash]
30773079

30783080
// If we have a set of DNS seeds for this chain, then we'll add

0 commit comments

Comments
 (0)