Skip to content

Commit

Permalink
core/rawdb: simplify TestDiskSeek to use memorydb (ethereum#25182)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronbuchwald authored and blakehhuynh committed Oct 7, 2022
1 parent 22c8e3a commit 3a47244
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions core/state/snapshot/disklayer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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...]
Expand Down

0 comments on commit 3a47244

Please sign in to comment.