aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/swarm
diff options
context:
space:
mode:
authorJanos Guljas <janos@resenje.org>2017-12-05 05:41:21 +0800
committerJanos Guljas <janos@resenje.org>2017-12-05 05:41:21 +0800
commite451b65faef95b159c38a607f716866e7bd3310f (patch)
tree072ceb7017ba288213a1d3cf2486084fbaa49901 /cmd/swarm
parent3732c15faa83e60024ef46b3def0c105c6912c47 (diff)
downloaddexon-e451b65faef95b159c38a607f716866e7bd3310f.tar
dexon-e451b65faef95b159c38a607f716866e7bd3310f.tar.gz
dexon-e451b65faef95b159c38a607f716866e7bd3310f.tar.bz2
dexon-e451b65faef95b159c38a607f716866e7bd3310f.tar.lz
dexon-e451b65faef95b159c38a607f716866e7bd3310f.tar.xz
dexon-e451b65faef95b159c38a607f716866e7bd3310f.tar.zst
dexon-e451b65faef95b159c38a607f716866e7bd3310f.zip
swarm: deprecate --ens-addr CLI flag with a warning message
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)