core, trie, eth, cmd: rework preimage store (#25287)

* core, trie, eth, cmd: rework preimage store

* trie: address comment
This commit is contained in:
rjl493456442
2022-07-27 20:37:04 +02:00
committed by GitHub
parent 54007f5e0a
commit 9d76a9b94f
6 changed files with 127 additions and 84 deletions
+2 -1
View File
@@ -29,6 +29,7 @@ import (
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/trie"
)
var dumper = spew.ConfigState{Indent: " "}
@@ -66,7 +67,7 @@ func TestAccountRange(t *testing.T) {
t.Parallel()
var (
statedb = state.NewDatabaseWithConfig(rawdb.NewMemoryDatabase(), nil)
statedb = state.NewDatabaseWithConfig(rawdb.NewMemoryDatabase(), &trie.Config{Preimages: true})
state, _ = state.New(common.Hash{}, statedb, nil)
addrs = [AccountRangeMaxResults * 2]common.Address{}
m = map[common.Address]bool{}