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
827f341c
Commit
827f341c
authored
Feb 07, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Genesis logging
parent
9f4a81a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
ethereum.go
ethereum.go
+9
-2
No files found.
ethereum.go
View file @
827f341c
...
@@ -20,10 +20,12 @@ var StartConsole bool
...
@@ -20,10 +20,12 @@ var StartConsole bool
var
StartMining
bool
var
StartMining
bool
var
UseUPnP
bool
var
UseUPnP
bool
var
OutboundPort
string
var
OutboundPort
string
var
ShowGenesis
bool
func
Init
()
{
func
Init
()
{
flag
.
BoolVar
(
&
StartConsole
,
"c"
,
false
,
"debug and testing console"
)
flag
.
BoolVar
(
&
StartConsole
,
"c"
,
false
,
"debug and testing console"
)
flag
.
BoolVar
(
&
StartMining
,
"m"
,
false
,
"start dagger mining"
)
flag
.
BoolVar
(
&
StartMining
,
"m"
,
false
,
"start dagger mining"
)
flag
.
BoolVar
(
&
ShowGenesis
,
"g"
,
false
,
"prints genesis header and exits"
)
flag
.
BoolVar
(
&
UseUPnP
,
"upnp"
,
false
,
"enable UPnP support"
)
flag
.
BoolVar
(
&
UseUPnP
,
"upnp"
,
false
,
"enable UPnP support"
)
flag
.
StringVar
(
&
OutboundPort
,
"port"
,
"30303"
,
"listening port"
)
flag
.
StringVar
(
&
OutboundPort
,
"port"
,
"30303"
,
"listening port"
)
...
@@ -52,8 +54,6 @@ func main() {
...
@@ -52,8 +54,6 @@ func main() {
ethchain
.
InitFees
()
ethchain
.
InitFees
()
ethutil
.
ReadConfig
()
ethutil
.
ReadConfig
()
log
.
Printf
(
"Starting Ethereum v%s
\n
"
,
ethutil
.
Config
.
Ver
)
// Instantiated a eth stack
// Instantiated a eth stack
ethereum
,
err
:=
eth
.
New
(
eth
.
CapDefault
,
UseUPnP
)
ethereum
,
err
:=
eth
.
New
(
eth
.
CapDefault
,
UseUPnP
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -61,6 +61,13 @@ func main() {
...
@@ -61,6 +61,13 @@ func main() {
return
return
}
}
if
ShowGenesis
{
fmt
.
Println
(
ethereum
.
BlockManager
.
BlockChain
()
.
Genesis
())
os
.
Exit
(
0
)
}
log
.
Printf
(
"Starting Ethereum v%s
\n
"
,
ethutil
.
Config
.
Ver
)
if
StartConsole
{
if
StartConsole
{
err
:=
os
.
Mkdir
(
ethutil
.
Config
.
ExecPath
,
os
.
ModePerm
)
err
:=
os
.
Mkdir
(
ethutil
.
Config
.
ExecPath
,
os
.
ModePerm
)
// Error is OK if the error is ErrExist
// Error is OK if the error is ErrExist
...
...
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