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
7ff75ac2
Commit
7ff75ac2
authored
Feb 28, 2017
by
Jeffrey Wilcke
Committed by
GitHub
Feb 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/utils, core, params: fork all teh things for dev mode (#3697)
parent
167be7f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
flags.go
cmd/utils/flags.go
+2
-0
genesis.go
core/genesis.go
+3
-0
config.go
params/config.go
+10
-0
No files found.
cmd/utils/flags.go
View file @
7ff75ac2
...
...
@@ -861,6 +861,8 @@ func MakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *params.ChainCon
if
defaults
{
if
ctx
.
GlobalBool
(
TestNetFlag
.
Name
)
{
config
=
params
.
TestnetChainConfig
}
else
if
ctx
.
GlobalBool
(
DevModeFlag
.
Name
)
{
config
=
params
.
AllProtocolChanges
}
else
{
// Homestead fork
config
.
HomesteadBlock
=
params
.
MainNetHomesteadBlock
...
...
core/genesis.go
View file @
7ff75ac2
...
...
@@ -64,6 +64,9 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block,
if
err
:=
json
.
Unmarshal
(
contents
,
&
genesis
);
err
!=
nil
{
return
nil
,
err
}
if
genesis
.
ChainConfig
==
nil
{
genesis
.
ChainConfig
=
params
.
AllProtocolChanges
}
// creating with empty hash always works
statedb
,
_
:=
state
.
New
(
common
.
Hash
{},
chainDb
)
...
...
params/config.go
View file @
7ff75ac2
...
...
@@ -47,6 +47,16 @@ var TestnetChainConfig = &ChainConfig{
EIP158Block
:
big
.
NewInt
(
10
),
}
// AllProtocolChanges contains every protocol change (EIPs)
// introduced and accepted by the Ethereum core developers.
//
// This configuration is intentionally not using keyed fields.
// This configuration must *always* have all forks enabled, which
// means that all fields must be set at all times. This forces
// anyone adding flags to the config to also have to set these
// fields.
var
AllProtocolChanges
=
&
ChainConfig
{
big
.
NewInt
(
1337
),
big
.
NewInt
(
0
),
nil
,
false
,
big
.
NewInt
(
0
),
common
.
Hash
{},
big
.
NewInt
(
0
),
big
.
NewInt
(
0
)}
// ChainConfig is the core config which determines the blockchain settings.
//
// ChainConfig is stored in the database on a per block basis. This means
...
...
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