Skip to content

Commit 08bf8a6

Browse files
authored
core: check genesis state presence by disk read (#26703)
1 parent 5ccc99b commit 08bf8a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/genesis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *trie.Database, gen
317317
// We have the genesis block in database(perhaps in ancient database)
318318
// but the corresponding state is missing.
319319
header := rawdb.ReadHeader(db, stored, 0)
320-
if _, err := state.New(header.Root, state.NewDatabaseWithNodeDB(db, triedb), nil); err != nil {
320+
if header.Root != types.EmptyRootHash && !rawdb.HasLegacyTrieNode(db, header.Root) {
321321
if genesis == nil {
322322
genesis = DefaultGenesisBlock()
323323
}

0 commit comments

Comments
 (0)