cmd/utils: validate pre-existing genesis in --dev mode (#28468)

geth --dev can be used with an existing data directory and genesis block. Since
dev mode only works with PoS, we need to verify that the merge has happened.

Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
jwasinger
2023-11-22 12:01:38 +01:00
committed by GitHub
co-authored by Felix Lange
parent d6cea4832a
commit 104dbf7821
4 changed files with 18 additions and 9 deletions
+1 -1
View File
@@ -589,7 +589,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