Skip to content

Commit

Permalink
cmd. core: save preimages on genesis creation (ethereum#25538)
Browse files Browse the repository at this point in the history
force preimage dump for genesis
  • Loading branch information
gballet authored and blakehhuynh committed Oct 3, 2022
1 parent 1266e5a commit 1220c7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/genesis.go
Expand Up @@ -104,7 +104,7 @@ func (ga *GenesisAlloc) deriveHash() (common.Hash, error) {
// all the generated states will be persisted into the given database.
// Also, the genesis state specification will be flushed as well.
func (ga *GenesisAlloc) flush(db ethdb.Database) error {
statedb, err := state.New(common.Hash{}, state.NewDatabase(db), nil)
statedb, err := state.New(common.Hash{}, state.NewDatabaseWithConfig(db, &trie.Config{Preimages: true}), nil)
if err != nil {
return err
}
Expand Down

0 comments on commit 1220c7c

Please sign in to comment.