forked from cerc-io/plugeth
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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user