core: don't check genesis hash for no tries

This commit is contained in:
weiihann 2024-03-18 13:51:45 +08:00 committed by buddho
parent ccd7a44be0
commit 74d20546c3

@ -281,7 +281,7 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *triedb.Database, g
// is initialized with an external ancient store. Commit genesis state
// in this case.
header := rawdb.ReadHeader(db, stored, 0)
if header.Root != types.EmptyRootHash && !triedb.Initialized(header.Root) {
if header.Root != types.EmptyRootHash && !triedb.Initialized(header.Root) && !triedb.Config().NoTries {
if genesis == nil {
genesis = DefaultBSCGenesisBlock()
}