diff options
author | Janos Guljas <janos@resenje.org> | 2017-12-05 05:20:29 +0800 |
---|---|---|
committer | Janos Guljas <janos@resenje.org> | 2017-12-05 05:20:29 +0800 |
commit | b33a051a487bed2a010b62a6f2dc531157341013 (patch) | |
tree | 47bd4c8f7a0302aaedafb701b79c0f19398de14b | |
parent | 7898e0d585ac16ca80ddef3ef6933cc6d12ba576 (diff) | |
download | dexon-b33a051a487bed2a010b62a6f2dc531157341013.tar dexon-b33a051a487bed2a010b62a6f2dc531157341013.tar.gz dexon-b33a051a487bed2a010b62a6f2dc531157341013.tar.bz2 dexon-b33a051a487bed2a010b62a6f2dc531157341013.tar.lz dexon-b33a051a487bed2a010b62a6f2dc531157341013.tar.xz dexon-b33a051a487bed2a010b62a6f2dc531157341013.tar.zst dexon-b33a051a487bed2a010b62a6f2dc531157341013.zip |
swarm: add comment for parseFlagEnsAPI and fix a mistake in comment in code
-rw-r--r-- | cmd/swarm/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go index 70cc42425..d9744c011 100644 --- a/cmd/swarm/main.go +++ b/cmd/swarm/main.go @@ -464,7 +464,6 @@ func registerBzzService(ctx *cli.Context, stack *node.Node) { case 1: // Check if only one --ens-api is specified in order to use --ens-addr value // to preserve the backward compatibility with single --ens-api flag. - // Multiple c := parseFlagEnsAPI(ensAPIs[0]) if ensAddr != "" { // If contract address is specified in both cases, check for conflict. @@ -498,6 +497,9 @@ func registerBzzService(ctx *cli.Context, stack *node.Node) { } } +// parseFlagEnsAPI parses EnsAPIFlag according to format +// [tld:][contract-addr@]url and returns ENSClientConfig structure +// with endpoint, contract address and TLD. func parseFlagEnsAPI(s string) swarm.ENSClientConfig { isAllLetterString := func(s string) bool { for _, r := range s { |