cmd. core: save preimages on genesis creation (#25538)

force preimage dump for genesis
pull/25547/head
Guillaume Ballet 2 years ago committed by GitHub
parent a50c006b49
commit 23ac8df153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      core/genesis.go

@ -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
}

Loading…
Cancel
Save