-
Notifications
You must be signed in to change notification settings - Fork 20.9k
reduce/deprecate the usage of the ambiguous term "testnet" #20852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 24 commits
61ad875
287608f
112edf1
86c0101
8e70856
e0c35d7
b482beb
637e57c
82ece4d
1194893
2329902
89a3002
1e3a1fa
ebbd2b5
3996f77
63deca6
799499b
a3da2d4
36be102
4bba9f7
aa27cf2
fbb994c
e81738a
5e0f03a
7246651
779cf5d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -246,8 +246,12 @@ func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig { | |
return g.Config | ||
case ghash == params.MainnetGenesisHash: | ||
return params.MainnetChainConfig | ||
case ghash == params.TestnetGenesisHash: | ||
return params.TestnetChainConfig | ||
case ghash == params.RopstenGenesisHash: | ||
return params.RopstenChainConfig | ||
case ghash == params.RinkebyGenesisHash: | ||
return params.RinkebyChainConfig | ||
case ghash == params.GoerliGenesisHash: | ||
return params.GoerliChainConfig | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code path is strange. Everything worked until now without having explicit clauses for Rinkeby and co. Maybe this is dead code? Perhaps we should investigate it a bit.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not entirely sure. It's used to setup genesis block in various places and detects known presets based on known genesis hashes. Logic allows the conclusion that we want to check for all known genesis hashes here. This PR, however, does not verify the logic beyond that function. |
||
default: | ||
return params.AllEthashProtocolChanges | ||
} | ||
|
@@ -347,15 +351,15 @@ func DefaultGenesisBlock() *Genesis { | |
} | ||
} | ||
|
||
// DefaultTestnetGenesisBlock returns the Ropsten network genesis block. | ||
func DefaultTestnetGenesisBlock() *Genesis { | ||
// DefaultRopstenGenesisBlock returns the Ropsten network genesis block. | ||
func DefaultRopstenGenesisBlock() *Genesis { | ||
return &Genesis{ | ||
Config: params.TestnetChainConfig, | ||
Config: params.RopstenChainConfig, | ||
Nonce: 66, | ||
ExtraData: hexutil.MustDecode("0x3535353535353535353535353535353535353535353535353535353535353535"), | ||
GasLimit: 16777216, | ||
Difficulty: big.NewInt(1048576), | ||
Alloc: decodePrealloc(testnetAllocData), | ||
Alloc: decodePrealloc(ropstenAllocData), | ||
} | ||
} | ||
|
||
|
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.