瀏覽代碼

swarm: check if "--ens-api ''" is specified in order to disable ENS

Janos Guljas 8 年之前
父節點
當前提交
15ad6f27da
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      cmd/swarm/main.go

+ 4 - 0
cmd/swarm/main.go

@@ -462,6 +462,10 @@ func registerBzzService(ctx *cli.Context, stack *node.Node) {
 				ContractAddress: ensAddr,
 			})
 		case 1:
+			// Check if "--ens-api ''" is specified in order to disable ENS.
+			if ensAPIs[0] == "" {
+				break
+			}
 			// 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.
 			c := parseFlagEnsAPI(ensAPIs[0])