Skip to content

Commit d972963

Browse files
committed
more fixes
1 parent 4d68af3 commit d972963

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/chain_makers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ func GenerateChain(config *params.ChainConfig, parent *types.Block, engine conse
472472
// then generate chain on top.
473473
func GenerateChainWithGenesis(genesis *Genesis, engine consensus.Engine, n int, gen func(int, *BlockGen)) (ethdb.Database, []*types.Block, []types.Receipts) {
474474
db := rawdb.NewMemoryDatabase()
475-
triedb := triedb.NewDatabase(db, triedb.VerkleDefaults)
475+
triedb := triedb.NewDatabase(db, triedb.HashDefaults)
476476
defer triedb.Close()
477477
_, err := genesis.Commit(db, triedb)
478478
if err != nil {

core/genesis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ func flushAlloc(ga *types.GenesisAlloc, triedb *triedb.Database) (common.Hash, e
190190
return common.Hash{}, err
191191
}
192192
// Commit newly generated states into disk if it's not empty.
193-
if root != types.EmptyRootHash {
193+
if root != types.EmptyRootHash && root != types.EmptyVerkleHash {
194194
if err := triedb.Commit(root, true); err != nil {
195195
return common.Hash{}, err
196196
}

0 commit comments

Comments
 (0)