Skip to content

Commit 300f612

Browse files
core/rawdb: simplify TestDiskSeek to use memorydb (#25182)
1 parent 3f712e7 commit 300f612

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

core/state/snapshot/disklayer_test.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"github.com/VictoriaMetrics/fastcache"
2424
"github.com/ethereum/go-ethereum/common"
2525
"github.com/ethereum/go-ethereum/core/rawdb"
26-
"github.com/ethereum/go-ethereum/ethdb/leveldb"
2726
"github.com/ethereum/go-ethereum/ethdb/memorydb"
2827
"github.com/ethereum/go-ethereum/rlp"
2928
)
@@ -515,11 +514,7 @@ func TestDiskMidAccountPartialMerge(t *testing.T) {
515514
// TestDiskSeek tests that seek-operations work on the disk layer
516515
func TestDiskSeek(t *testing.T) {
517516
// Create some accounts in the disk layer
518-
diskdb, err := leveldb.New(t.TempDir(), 256, 0, "", false)
519-
if err != nil {
520-
t.Fatal(err)
521-
}
522-
db := rawdb.NewDatabase(diskdb)
517+
db := rawdb.NewMemoryDatabase()
523518
defer db.Close()
524519

525520
// Fill even keys [0,2,4...]

0 commit comments

Comments
 (0)