revert change (#2669)

This commit is contained in:
Alex Sharov 2021-09-12 10:05:42 +07:00 committed by GitHub
parent b5a6046fc3
commit 9ac16d2528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -278,7 +278,7 @@ func WriteGenesisBlock(db kv.RwTx, genesis *Genesis) (*params.ChainConfig, *type
// are returned to the caller unless we're already at block zero. // are returned to the caller unless we're already at block zero.
height := rawdb.ReadHeaderNumber(db, rawdb.ReadHeadHeaderHash(db)) height := rawdb.ReadHeaderNumber(db, rawdb.ReadHeadHeaderHash(db))
if height == nil { if height == nil {
return newcfg, storedBlock, fmt.Errorf("missing block number for head header hash") //return newcfg, storedBlock, fmt.Errorf("missing block number for head header hash")
} else { } else {
compatErr := storedcfg.CheckCompatible(newcfg, *height) compatErr := storedcfg.CheckCompatible(newcfg, *height)
if compatErr != nil && *height != 0 && compatErr.RewindTo != 0 { if compatErr != nil && *height != 0 && compatErr.RewindTo != 0 {