|
|
|
@ -152,10 +152,6 @@ func (e *GenesisMismatchError) Error() string { |
|
|
|
|
//
|
|
|
|
|
// The returned chain configuration is never nil.
|
|
|
|
|
func SetupGenesisBlock(db ethdb.Database, genesis *Genesis) (*params.ChainConfig, common.Hash, error) { |
|
|
|
|
return SetupGenesisBlockWithOverride(db, genesis, nil, nil) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func SetupGenesisBlockWithOverride(db ethdb.Database, genesis *Genesis, overrideIstanbul, overrideMuirGlacier *big.Int) (*params.ChainConfig, common.Hash, error) { |
|
|
|
|
if genesis != nil && genesis.Config == nil { |
|
|
|
|
return params.AllEthashProtocolChanges, common.Hash{}, errGenesisNoConfig |
|
|
|
|
} |
|
|
|
@ -204,12 +200,6 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, genesis *Genesis, override |
|
|
|
|
|
|
|
|
|
// Get the existing chain configuration.
|
|
|
|
|
newcfg := genesis.configOrDefault(stored) |
|
|
|
|
if overrideIstanbul != nil { |
|
|
|
|
newcfg.IstanbulBlock = overrideIstanbul |
|
|
|
|
} |
|
|
|
|
if overrideMuirGlacier != nil { |
|
|
|
|
newcfg.MuirGlacierBlock = overrideMuirGlacier |
|
|
|
|
} |
|
|
|
|
if err := newcfg.CheckConfigForkOrder(); err != nil { |
|
|
|
|
return newcfg, common.Hash{}, err |
|
|
|
|
} |
|
|
|
|