From bca6c0d115506c057f2be85022363ac6576d285f Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Fri, 27 Jun 2025 15:56:18 +0200 Subject: [PATCH] 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. --- server.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server.go b/server.go index 7e35c33ec..f6884a1fe 100644 --- a/server.go +++ b/server.go @@ -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