From f2ef80af0d5541d2ca1d7524c5b89c42406ae021 Mon Sep 17 00:00:00 2001 From: aaronbuchwald Date: Wed, 29 Jun 2022 05:54:42 -0400 Subject: [PATCH] core/rawdb: simplify TestDiskSeek to use memorydb (#25182) --- core/state/snapshot/disklayer_test.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/core/state/snapshot/disklayer_test.go b/core/state/snapshot/disklayer_test.go index b078951c72aa0..f95b79851598e 100644 --- a/core/state/snapshot/disklayer_test.go +++ b/core/state/snapshot/disklayer_test.go @@ -23,7 +23,6 @@ import ( "github.com/VictoriaMetrics/fastcache" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" - "github.com/ethereum/go-ethereum/ethdb/leveldb" "github.com/ethereum/go-ethereum/ethdb/memorydb" "github.com/ethereum/go-ethereum/rlp" ) @@ -515,11 +514,7 @@ func TestDiskMidAccountPartialMerge(t *testing.T) { // TestDiskSeek tests that seek-operations work on the disk layer func TestDiskSeek(t *testing.T) { // Create some accounts in the disk layer - diskdb, err := leveldb.New(t.TempDir(), 256, 0, "", false) - if err != nil { - t.Fatal(err) - } - db := rawdb.NewDatabase(diskdb) + db := rawdb.NewMemoryDatabase() defer db.Close() // Fill even keys [0,2,4...]