From 9bdf2fa39d23a47e8d411cb6b9f3de66b36f40bc Mon Sep 17 00:00:00 2001 From: meows Date: Thu, 2 Nov 2023 17:02:45 -0600 Subject: [PATCH] cmd/utils: use @snap discovery URL for snap-discovery config We have all.classic.blockd.info AND snap.classic.blockd.info, so let's use both of them in reasonable places. Date: 2023-11-02 17:02:45-06:00 Signed-off-by: meows --- cmd/utils/flags.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 515a0f7424..cf1755cfc2 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -2244,14 +2244,16 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { // SetDNSDiscoveryDefaults2 configures DNS discovery with the given URL if no URLs are set. func SetDNSDiscoveryDefaults2(cfg *ethconfig.Config, url string) { + var ethURL = url if cfg.EthDiscoveryURLs != nil { + log.Warn("Short circuiting DNS discovery defaults (should be manually configured)") return } if cfg.SyncMode == downloader.LightSync { - url = strings.Replace(url, "@all.", "@les.", 1) + ethURL = strings.Replace(url, "@all.", "@les.", 1) } - cfg.EthDiscoveryURLs = []string{url} - cfg.SnapDiscoveryURLs = cfg.EthDiscoveryURLs + cfg.EthDiscoveryURLs = []string{ethURL} + cfg.SnapDiscoveryURLs = []string{strings.Replace(url, "@all.", "@snap.", 1)} } // SetDNSDiscoveryDefaults configures DNS discovery with the given URL if