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
a1798a81
Unverified
Commit
a1798a81
authored
Jan 05, 2017
by
Bas van Kervel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core,cmd/utils: bugfix for ropsten dump imports
parent
0fac8cba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
flags.go
cmd/utils/flags.go
+8
-0
default_genesis.go
core/default_genesis.go
+2
-0
genesis.go
core/genesis.go
+3
-1
No files found.
cmd/utils/flags.go
View file @
a1798a81
...
...
@@ -925,11 +925,19 @@ func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chai
chainDb
=
MakeChainDatabase
(
ctx
,
stack
)
if
ctx
.
GlobalBool
(
OlympicFlag
.
Name
)
{
_
,
err
:=
core
.
WriteOlympicGenesisBlock
(
chainDb
)
if
err
!=
nil
{
glog
.
Fatalln
(
err
)
}
}
if
ctx
.
GlobalBool
(
TestNetFlag
.
Name
)
{
_
,
err
:=
core
.
WriteTestNetGenesisBlock
(
chainDb
)
if
err
!=
nil
{
glog
.
Fatalln
(
err
)
}
}
chainConfig
:=
MakeChainConfigFromDb
(
ctx
,
chainDb
)
pow
:=
pow
.
PoW
(
core
.
FakePow
{})
...
...
core/default_genesis.go
View file @
a1798a81
This source diff could not be displayed because it is too large. You can
view the blob
instead.
core/genesis.go
View file @
a1798a81
...
...
@@ -172,7 +172,7 @@ func WriteDefaultGenesisBlock(chainDb ethdb.Database) (*types.Block, error) {
return
WriteGenesisBlock
(
chainDb
,
strings
.
NewReader
(
DefaultGenesisBlock
()))
}
// WriteTestNetGenesisBlock assembles the
Morden
test network genesis block and
// WriteTestNetGenesisBlock assembles the test network genesis block and
// writes it - along with all associated state - into a chain database.
func
WriteTestNetGenesisBlock
(
chainDb
ethdb
.
Database
)
(
*
types
.
Block
,
error
)
{
return
WriteGenesisBlock
(
chainDb
,
strings
.
NewReader
(
DefaultTestnetGenesisBlock
()))
...
...
@@ -198,6 +198,8 @@ func DefaultGenesisBlock() string {
return
string
(
blob
)
}
// DefaultTestnetGenesisBlock assembles a JSON string representing the default Ethereum
// test network genesis block.
func
DefaultTestnetGenesisBlock
()
string
{
reader
:=
bzip2
.
NewReader
(
base64
.
NewDecoder
(
base64
.
StdEncoding
,
strings
.
NewReader
(
defaultTestnetGenesisBlock
)))
blob
,
err
:=
ioutil
.
ReadAll
(
reader
)
...
...
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