Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
03b4cf74
Commit
03b4cf74
authored
Apr 18, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
geth: added identity flag which allows to set a custom node name
parent
d34e4dc5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
main.go
cmd/geth/main.go
+1
-0
flags.go
cmd/utils/flags.go
+9
-0
No files found.
cmd/geth/main.go
View file @
03b4cf74
...
@@ -218,6 +218,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
...
@@ -218,6 +218,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
},
},
}
}
app
.
Flags
=
[]
cli
.
Flag
{
app
.
Flags
=
[]
cli
.
Flag
{
utils
.
IdentityFlag
,
utils
.
UnlockedAccountFlag
,
utils
.
UnlockedAccountFlag
,
utils
.
PasswordFileFlag
,
utils
.
PasswordFileFlag
,
utils
.
BootnodesFlag
,
utils
.
BootnodesFlag
,
...
...
cmd/utils/flags.go
View file @
03b4cf74
...
@@ -89,6 +89,10 @@ var (
...
@@ -89,6 +89,10 @@ var (
Usage
:
"Blockchain version"
,
Usage
:
"Blockchain version"
,
Value
:
core
.
BlockChainVersion
,
Value
:
core
.
BlockChainVersion
,
}
}
IdentityFlag
=
cli
.
StringFlag
{
Name
:
"identity"
,
Usage
:
"node name"
,
}
// miner settings
// miner settings
MinerThreadsFlag
=
cli
.
IntFlag
{
MinerThreadsFlag
=
cli
.
IntFlag
{
...
@@ -242,6 +246,11 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
...
@@ -242,6 +246,11 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
// Set the log dir
// Set the log dir
glog
.
SetLogDir
(
ctx
.
GlobalString
(
LogFileFlag
.
Name
))
glog
.
SetLogDir
(
ctx
.
GlobalString
(
LogFileFlag
.
Name
))
customName
:=
ctx
.
GlobalString
(
IdentityFlag
.
Name
)
if
len
(
customName
)
>
0
{
clientID
+=
"/"
+
customName
}
return
&
eth
.
Config
{
return
&
eth
.
Config
{
Name
:
common
.
MakeName
(
clientID
,
version
),
Name
:
common
.
MakeName
(
clientID
,
version
),
DataDir
:
ctx
.
GlobalString
(
DataDirFlag
.
Name
),
DataDir
:
ctx
.
GlobalString
(
DataDirFlag
.
Name
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment