From 8c902b156b1c35d17ce45de2525c80bf71c77b5b Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 23 Nov 2021 23:21:25 +0400 Subject: [PATCH] feat: circuit v1 migration prompt when Swarm.EnableRelayHop is set (#8559) * exit when Swarm.EnableRelayHop is set * chore: go-ipfs-config v0.18.0 Co-authored-by: Marcin Rataj --- core/node/groups.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/node/groups.go b/core/node/groups.go index d0da1727f17..1439ca864f7 100644 --- a/core/node/groups.go +++ b/core/node/groups.go @@ -133,6 +133,12 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option { logger.Error("'Swarm.EnableAutoRelay' has been overridden by 'Swarm.AutoRelay.Enabled'") } } + //nolint + if cfg.Swarm.EnableRelayHop { + logger.Fatal("The `Swarm.EnableRelayHop` config field is ignored.\n" + + "Use `Swarm.RelayService` to configure the circuit v2 relay.\n" + + "If you want to continue running a circuit v1 relay, please use the standalone relay daemon: https://github.com/libp2p/go-libp2p-relay-daemon (with RelayV1.Enabled: true)") + } // Gather all the options opts := fx.Options(