mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
set developer default genesis block difficulty to 0. add validation that developer genesis block ttd == difficulty == 0.
This commit is contained in:
parent
0da69e84c0
commit
ffeaf041f4
1 changed files with 5 additions and 2 deletions
|
|
@ -1877,8 +1877,11 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
||||||
if genesis.Config.TerminalTotalDifficulty == nil {
|
if genesis.Config.TerminalTotalDifficulty == nil {
|
||||||
Fatalf("Bad developer-mode genesis configuration: terminalTotalDifficulty must be specified.")
|
Fatalf("Bad developer-mode genesis configuration: terminalTotalDifficulty must be specified.")
|
||||||
}
|
}
|
||||||
if genesis.Difficulty.Cmp(genesis.Config.TerminalTotalDifficulty) != 1 {
|
if genesis.Difficulty.Cmp(big.NewInt(0)) != 0 {
|
||||||
Fatalf("Bad developer-mode genesis configuration: genesis block difficulty must be > terminalTotalDifficulty")
|
Fatalf("Bad developer-mode genesis configuration: genesis block difficulty must be 0")
|
||||||
|
}
|
||||||
|
if genesis.Config.TerminalTotalDifficulty.Cmp(big.NewInt(0)) != 0 {
|
||||||
|
Fatalf("Bad developer-mode genesis configuration: genesis block terminalTotalDifficulty must be 0")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
chaindb.Close()
|
chaindb.Close()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue