Unverified Commit 300f6121 authored by aaronbuchwald's avatar aaronbuchwald Committed by GitHub

core/rawdb: simplify TestDiskSeek to use memorydb (#25182)

parent 3f712e74
...@@ -23,7 +23,6 @@ import ( ...@@ -23,7 +23,6 @@ import (
"github.com/VictoriaMetrics/fastcache" "github.com/VictoriaMetrics/fastcache"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/rawdb" "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/ethdb/memorydb"
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
) )
...@@ -515,11 +514,7 @@ func TestDiskMidAccountPartialMerge(t *testing.T) { ...@@ -515,11 +514,7 @@ func TestDiskMidAccountPartialMerge(t *testing.T) {
// TestDiskSeek tests that seek-operations work on the disk layer // TestDiskSeek tests that seek-operations work on the disk layer
func TestDiskSeek(t *testing.T) { func TestDiskSeek(t *testing.T) {
// Create some accounts in the disk layer // Create some accounts in the disk layer
diskdb, err := leveldb.New(t.TempDir(), 256, 0, "", false) db := rawdb.NewMemoryDatabase()
if err != nil {
t.Fatal(err)
}
db := rawdb.NewDatabase(diskdb)
defer db.Close() defer db.Close()
// Fill even keys [0,2,4...] // Fill even keys [0,2,4...]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment