aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/swarm
diff options
context:
space:
mode:
authorJanos Guljas <janos@resenje.org>2017-12-05 05:20:29 +0800
committerJanos Guljas <janos@resenje.org>2017-12-05 05:20:29 +0800
commitb33a051a487bed2a010b62a6f2dc531157341013 (patch)
tree47bd4c8f7a0302aaedafb701b79c0f19398de14b /cmd/swarm
parent7898e0d585ac16ca80ddef3ef6933cc6d12ba576 (diff)
downloadgo-tangerine-b33a051a487bed2a010b62a6f2dc531157341013.tar
go-tangerine-b33a051a487bed2a010b62a6f2dc531157341013.tar.gz
go-tangerine-b33a051a487bed2a010b62a6f2dc531157341013.tar.bz2
go-tangerine-b33a051a487bed2a010b62a6f2dc531157341013.tar.lz
go-tangerine-b33a051a487bed2a010b62a6f2dc531157341013.tar.xz
go-tangerine-b33a051a487bed2a010b62a6f2dc531157341013.tar.zst
go-tangerine-b33a051a487bed2a010b62a6f2dc531157341013.zip
swarm: add comment for parseFlagEnsAPI and fix a mistake in comment in code
Diffstat (limited to 'cmd/swarm')
-rw-r--r--cmd/swarm/main.go4
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 {