Skip to content

Commit 23ac8df

Browse files
authored
cmd. core: save preimages on genesis creation (#25538)
force preimage dump for genesis
1 parent a50c006 commit 23ac8df

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
@@ -104,7 +104,7 @@ func (ga *GenesisAlloc) deriveHash() (common.Hash, error) {
104104
// all the generated states will be persisted into the given database.
105105
// Also, the genesis state specification will be flushed as well.
106106
func (ga *GenesisAlloc) flush(db ethdb.Database) error {
107-
statedb, err := state.New(common.Hash{}, state.NewDatabase(db), nil)
107+
statedb, err := state.New(common.Hash{}, state.NewDatabaseWithConfig(db, &trie.Config{Preimages: true}), nil)
108108
if err != nil {
109109
return err
110110
}

0 commit comments

Comments
 (0)