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
@@ -25,6 +25,7 @@ import (
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/trie"
)
type stateTest struct {
@@ -40,7 +41,7 @@ func newStateTest() *stateTest {
func TestDump(t *testing.T) {
db := rawdb.NewMemoryDatabase()
sdb, _ := New(common.Hash{}, NewDatabaseWithConfig(db, nil), nil)
sdb, _ := New(common.Hash{}, NewDatabaseWithConfig(db, &trie.Config{Preimages: true}), nil)
s := &stateTest{db: db, state: sdb}
// generate a few entries