aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/swarm
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/swarm')
-rw-r--r--cmd/swarm/main.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go
index a937a9119..48cf032a2 100644
--- a/cmd/swarm/main.go
+++ b/cmd/swarm/main.go
@@ -101,10 +101,6 @@ var (
Name: "ens-api",
Usage: "ENS API endpoint for a TLD and with contract address, can be repeated, format [tld:][contract-addr@]url",
}
- EnsAddrFlag = cli.StringFlag{
- Name: "ens-addr",
- Usage: "ENS contract address (default is detected as testnet or mainnet using --ens-api)",
- }
SwarmApiFlag = cli.StringFlag{
Name: "bzzapi",
Usage: "Swarm HTTP endpoint",
@@ -140,6 +136,10 @@ var (
Name: "ethapi",
Usage: "DEPRECATED: please use --ens-api and --swap-api",
}
+ DeprecatedEnsAddrFlag = cli.StringFlag{
+ Name: "ens-addr",
+ Usage: "DEPRECATED: ENS contract address, please use --ens-api with contract address according to its format",
+ }
)
var defaultNodeConfig = node.DefaultConfig
@@ -319,7 +319,6 @@ DEPRECATED: use 'swarm db clean'.
// bzzd-specific flags
CorsStringFlag,
EnsAPIFlag,
- EnsAddrFlag,
SwarmConfigPathFlag,
SwarmSwapEnabledFlag,
SwarmSwapAPIFlag,
@@ -338,6 +337,7 @@ DEPRECATED: use 'swarm db clean'.
SwarmUploadMimeType,
//deprecated flags
DeprecatedEthAPIFlag,
+ DeprecatedEnsAddrFlag,
}
app.Flags = append(app.Flags, debug.Flags...)
app.Before = func(ctx *cli.Context) error {
@@ -440,7 +440,11 @@ func registerBzzService(ctx *cli.Context, stack *node.Node) {
}
ensAPIs := ctx.GlobalStringSlice(EnsAPIFlag.Name)
- ensAddr := ctx.GlobalString(EnsAddrFlag.Name)
+ ensAddr := ctx.GlobalString(DeprecatedEnsAddrFlag.Name)
+
+ if ensAddr != "" {
+ log.Warn("--ens-addr is no longer a valid command line flag, please use --ens-api to specify contract address.")
+ }
cors := ctx.GlobalString(CorsStringFlag.Name)