diff --git a/core/chain_makers.go b/core/chain_makers.go index ebf0ca59f8..af55716cca 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -472,7 +472,7 @@ func GenerateChain(config *params.ChainConfig, parent *types.Block, engine conse // then generate chain on top. func GenerateChainWithGenesis(genesis *Genesis, engine consensus.Engine, n int, gen func(int, *BlockGen)) (ethdb.Database, []*types.Block, []types.Receipts) { db := rawdb.NewMemoryDatabase() - triedb := triedb.NewDatabase(db, triedb.VerkleDefaults) + triedb := triedb.NewDatabase(db, triedb.HashDefaults) defer triedb.Close() _, err := genesis.Commit(db, triedb) if err != nil { diff --git a/core/genesis.go b/core/genesis.go index d0d490874d..b41969de8e 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -190,7 +190,7 @@ func flushAlloc(ga *types.GenesisAlloc, triedb *triedb.Database) (common.Hash, e return common.Hash{}, err } // Commit newly generated states into disk if it's not empty. - if root != types.EmptyRootHash { + if root != types.EmptyRootHash && root != types.EmptyVerkleHash { if err := triedb.Commit(root, true); err != nil { return common.Hash{}, err }