cmd/utils: fix --identity

This commit is contained in:
Felix Lange 2017-04-12 15:52:23 +02:00
parent 0e3ef84138
commit 75e08ae83f

View file

@ -454,11 +454,9 @@ func setNodeKey(ctx *cli.Context, cfg *p2p.Config) {
// setNodeUserIdent creates the user identifier from CLI flags. // setNodeUserIdent creates the user identifier from CLI flags.
func setNodeUserIdent(ctx *cli.Context, cfg *node.Config) { func setNodeUserIdent(ctx *cli.Context, cfg *node.Config) {
comps := strings.Split(cfg.UserIdent, "/")
if identity := ctx.GlobalString(IdentityFlag.Name); len(identity) > 0 { if identity := ctx.GlobalString(IdentityFlag.Name); len(identity) > 0 {
comps = append(comps, identity) cfg.UserIdent = identity
} }
cfg.UserIdent = strings.Join(comps, "/")
} }
// setBootstrapNodes creates a list of bootstrap nodes from the command line // setBootstrapNodes creates a list of bootstrap nodes from the command line