good morning!!!!

Skip to content
Snippets Groups Projects
Commit 03b4cf74 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

geth: added identity flag which allows to set a custom node name

parent d34e4dc5
No related branches found
No related tags found
No related merge requests found
......@@ -218,6 +218,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
},
}
app.Flags = []cli.Flag{
utils.IdentityFlag,
utils.UnlockedAccountFlag,
utils.PasswordFileFlag,
utils.BootnodesFlag,
......
......@@ -89,6 +89,10 @@ var (
Usage: "Blockchain version",
Value: core.BlockChainVersion,
}
IdentityFlag = cli.StringFlag{
Name: "identity",
Usage: "node name",
}
// miner settings
MinerThreadsFlag = cli.IntFlag{
......@@ -242,6 +246,11 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
// Set the log dir
glog.SetLogDir(ctx.GlobalString(LogFileFlag.Name))
customName := ctx.GlobalString(IdentityFlag.Name)
if len(customName) > 0 {
clientID += "/" + customName
}
return &eth.Config{
Name: common.MakeName(clientID, version),
DataDir: ctx.GlobalString(DataDirFlag.Name),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment