diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 3b4e0c4466..dcde481929 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1877,7 +1877,13 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { Fatalf("Could not read genesis from database: %v", err) } if !genesis.Config.TerminalTotalDifficultyPassed { - Fatalf("Bad genesis configuration: ttd must be passed in block 0 in developer mode") + Fatalf("Bad developer-mode genesis configuration: terminal total difficulty must be passed in block 0 in developer mode") + } + if genesis.Config.TerminalTotalDifficulty == nil { + Fatalf("Bad developer-mode genesis configuration: terminal total difficulty must be specified.") + } + if genesis.Difficulty.Cmp(genesis.Config.TerminalTotalDifficulty) != 1 { + Fatalf("Bad developer-mode genesis configuration: genesis block difficulty must be greater than ttd") } } chaindb.Close() diff --git a/core/genesis.go b/core/genesis.go index 1045815fab..09dca7b579 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -572,7 +572,7 @@ func DeveloperGenesisBlock(gasLimit uint64, faucet common.Address) *Genesis { Config: &config, GasLimit: gasLimit, BaseFee: big.NewInt(params.InitialBaseFee), - Difficulty: big.NewInt(0), + Difficulty: big.NewInt(1), Alloc: map[common.Address]GenesisAccount{ common.BytesToAddress([]byte{1}): {Balance: big.NewInt(1)}, // ECRecover common.BytesToAddress([]byte{2}): {Balance: big.NewInt(1)}, // SHA256