From 3fea197a89d6f36ffde77d476aa3a81811edb099 Mon Sep 17 00:00:00 2001 From: joeycli Date: Wed, 11 Oct 2023 23:27:53 +0800 Subject: [PATCH] fix: lint error --- core/rawdb/schema.go | 2 +- core/state/statedb_fuzz_test.go | 2 +- core/state/statedb_test.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/rawdb/schema.go b/core/rawdb/schema.go index 9e7f8500cb..d21ece898f 100644 --- a/core/rawdb/schema.go +++ b/core/rawdb/schema.go @@ -117,7 +117,7 @@ var ( SnapshotAccountPrefix = []byte("a") // SnapshotAccountPrefix + account hash -> account trie value SnapshotStoragePrefix = []byte("o") // SnapshotStoragePrefix + account hash + storage hash -> storage trie value CodePrefix = []byte("c") // CodePrefix + code hash -> account code - + // difflayer database diffLayerPrefix = []byte("d") // diffLayerPrefix + hash -> diffLayer diff --git a/core/state/statedb_fuzz_test.go b/core/state/statedb_fuzz_test.go index 86cab2117f..26ca9b5e7d 100644 --- a/core/state/statedb_fuzz_test.go +++ b/core/state/statedb_fuzz_test.go @@ -195,7 +195,7 @@ func (test *stateTest) run() bool { Recovery: false, NoBuild: false, AsyncBuild: false, - }, disk, tdb, types.EmptyRootHash) + }, disk, tdb, types.EmptyRootHash, 128, false) } for i, actions := range test.actions { root := types.EmptyRootHash diff --git a/core/state/statedb_test.go b/core/state/statedb_test.go index 815e0114c7..eed905a87e 100644 --- a/core/state/statedb_test.go +++ b/core/state/statedb_test.go @@ -1120,7 +1120,7 @@ func TestDeleteStorage(t *testing.T) { disk = rawdb.NewMemoryDatabase() tdb = trie.NewDatabase(disk, nil) db = NewDatabaseWithNodeDB(disk, tdb) - snaps, _ = snapshot.New(snapshot.Config{CacheSize: 10}, disk, tdb, types.EmptyRootHash) + snaps, _ = snapshot.New(snapshot.Config{CacheSize: 10}, disk, tdb, types.EmptyRootHash, 128, false) state, _ = New(types.EmptyRootHash, db, snaps) addr = common.HexToAddress("0x1") ) @@ -1132,7 +1132,7 @@ func TestDeleteStorage(t *testing.T) { value := common.Hash(uint256.NewInt(uint64(10 * i)).Bytes32()) state.SetState(addr, slot, value) } - root, _ := state.Commit(0, true) + root, _, _ := state.Commit(0, nil) // Init phase done, create two states, one with snap and one without fastState, _ := New(root, db, snaps) slowState, _ := New(root, db, nil)