diff options
author | Felix Lange <fjl@twurst.com> | 2017-01-11 04:11:34 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2017-01-11 04:13:43 +0800 |
commit | 445deb74702b735f76ec7232e4b4afe7b8f6f94b (patch) | |
tree | e1f1720707b3b2b335fc9b58ea07ae09c2f83fbf | |
parent | 02b67558e8eaa7b34a28b8dd0223824bbbb52349 (diff) | |
download | go-tangerine-445deb74702b735f76ec7232e4b4afe7b8f6f94b.tar go-tangerine-445deb74702b735f76ec7232e4b4afe7b8f6f94b.tar.gz go-tangerine-445deb74702b735f76ec7232e4b4afe7b8f6f94b.tar.bz2 go-tangerine-445deb74702b735f76ec7232e4b4afe7b8f6f94b.tar.lz go-tangerine-445deb74702b735f76ec7232e4b4afe7b8f6f94b.tar.xz go-tangerine-445deb74702b735f76ec7232e4b4afe7b8f6f94b.tar.zst go-tangerine-445deb74702b735f76ec7232e4b4afe7b8f6f94b.zip |
cmd/utils: fix comma-separated --bootnodes
-rw-r--r-- | cmd/utils/flags.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 18745e557..5092616de 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -337,10 +337,10 @@ var ( Usage: "Network listening port", Value: 30303, } - BootnodesFlag = cli.StringSliceFlag{ + BootnodesFlag = cli.StringFlag{ Name: "bootnodes", Usage: "Comma separated enode URLs for P2P discovery bootstrap", - Value: nil, + Value: "", } NodeKeyFileFlag = cli.StringFlag{ Name: "nodekey", @@ -487,7 +487,7 @@ func makeNodeUserIdent(ctx *cli.Context) string { func MakeBootstrapNodes(ctx *cli.Context) []*discover.Node { urls := params.MainnetBootnodes if ctx.GlobalIsSet(BootnodesFlag.Name) { - urls = ctx.GlobalStringSlice(BootnodesFlag.Name) + urls = strings.Split(ctx.GlobalString(BootnodesFlag.Name), ",") } else if ctx.GlobalBool(TestNetFlag.Name) { urls = params.TestnetBootnodes } @@ -509,7 +509,7 @@ func MakeBootstrapNodes(ctx *cli.Context) []*discover.Node { func MakeBootstrapNodesV5(ctx *cli.Context) []*discv5.Node { urls := params.DiscoveryV5Bootnodes if ctx.GlobalIsSet(BootnodesFlag.Name) { - urls = ctx.GlobalStringSlice(BootnodesFlag.Name) + urls = strings.Split(ctx.GlobalString(BootnodesFlag.Name), ",") } bootnodes := make([]*discv5.Node, 0, len(urls)) |