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
-4
View File
@@ -82,10 +82,6 @@ type SimulatedBeacon struct {
}
func NewSimulatedBeacon(period uint64, eth *eth.Ethereum) (*SimulatedBeacon, error) {
chainConfig := eth.APIBackend.ChainConfig()
if !chainConfig.IsDevMode {
return nil, errors.New("incompatible pre-existing chain configuration")
}
block := eth.BlockChain().CurrentBlock()
current := engine.ForkchoiceStateV1{
HeadBlockHash: block.Hash(),