mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
remove reversion
This commit is contained in:
parent
dc2ba5ed64
commit
c9d5208610
1 changed files with 3 additions and 0 deletions
|
|
@ -1801,6 +1801,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
||||||
if ctx.IsSet(DataDirFlag.Name) {
|
if ctx.IsSet(DataDirFlag.Name) {
|
||||||
chaindb := tryMakeReadOnlyDatabase(ctx, stack)
|
chaindb := tryMakeReadOnlyDatabase(ctx, stack)
|
||||||
if rawdb.ReadCanonicalHash(chaindb, 0) != (common.Hash{}) {
|
if rawdb.ReadCanonicalHash(chaindb, 0) != (common.Hash{}) {
|
||||||
|
// signal fallback to preexisting chain on disk
|
||||||
|
cfg.Genesis = nil
|
||||||
|
|
||||||
genesis, err := core.ReadGenesis(chaindb)
|
genesis, err := core.ReadGenesis(chaindb)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Fatalf("Could not read genesis from database: %v", err)
|
Fatalf("Could not read genesis from database: %v", err)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue