good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
96c7c39a
Commit
96c7c39a
authored
Apr 2, 2016
by
Jeffrey Wilcke
Browse files
Options
Downloads
Plain Diff
Merge pull request #2409 from fjl/geth-fixup-init
cmd/geth: fix startup with empty database
parents
fb578f45
cf842b3f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmd/geth/main.go
+6
-0
6 additions, 0 deletions
cmd/geth/main.go
cmd/utils/flags.go
+13
-14
13 additions, 14 deletions
cmd/utils/flags.go
eth/backend.go
+0
-4
0 additions, 4 deletions
eth/backend.go
with
19 additions
and
18 deletions
cmd/geth/main.go
+
6
−
0
View file @
96c7c39a
...
...
@@ -359,6 +359,12 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
go
metrics
.
CollectProcessMetrics
(
3
*
time
.
Second
)
utils
.
SetupNetwork
(
ctx
)
// Deprecation warning.
if
ctx
.
GlobalIsSet
(
utils
.
GenesisFileFlag
.
Name
)
{
common
.
PrintDepricationWarning
(
"--genesis is deprecated. Switch to use 'geth init /path/to/file'"
)
}
return
nil
}
...
...
This diff is collapsed.
Click to expand it.
cmd/utils/flags.go
+
13
−
14
View file @
96c7c39a
...
...
@@ -772,23 +772,22 @@ func MustMakeChainConfig(ctx *cli.Context) *core.ChainConfig {
)
defer
db
.
Close
()
chainConfig
,
err
:=
core
.
GetChainConfig
(
db
,
genesis
.
Hash
())
if
err
!=
nil
{
if
err
!=
core
.
ChainConfigNotFoundErr
{
if
genesis
!=
nil
{
// Exsting genesis block, use stored config if available.
storedConfig
,
err
:=
core
.
GetChainConfig
(
db
,
genesis
.
Hash
())
if
err
==
nil
{
return
storedConfig
}
else
if
err
!=
core
.
ChainConfigNotFoundErr
{
Fatalf
(
"Could not make chain configuration: %v"
,
err
)
}
}
var
homesteadBlockNo
*
big
.
Int
if
ctx
.
GlobalBool
(
TestNetFlag
.
Name
)
{
homesteadBlockNo
=
params
.
TestNetHomesteadBlock
}
else
{
homesteadBlockNo
=
params
.
MainNetHomesteadBlock
}
chainConfig
=
&
core
.
ChainConfig
{
HomesteadBlock
:
homesteadBlockNo
,
}
}
return
chainConfig
return
&
core
.
ChainConfig
{
HomesteadBlock
:
homesteadBlockNo
}
}
// MakeChainDatabase open an LevelDB using the flags passed to the client and will hard crash if it fails.
...
...
This diff is collapsed.
Click to expand it.
eth/backend.go
+
0
−
4
View file @
96c7c39a
...
...
@@ -169,10 +169,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
// Load up any custom genesis block if requested
if
len
(
config
.
Genesis
)
>
0
{
// Using println instead of glog to make sure it **always** displays regardless of
// verbosity settings.
common
.
PrintDepricationWarning
(
"--genesis is deprecated. Switch to use 'geth init /path/to/file'"
)
block
,
err
:=
core
.
WriteGenesisBlock
(
chainDb
,
strings
.
NewReader
(
config
.
Genesis
))
if
err
!=
nil
{
return
nil
,
err
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment