Skip to content

Commit

Permalink
Revert "ethdb/dbtest: use slices package for sorting (ethereum#27491)"
Browse files Browse the repository at this point in the history
This reverts commit 42aebf3.
  • Loading branch information
devopsbo3 committed Nov 10, 2023
1 parent 0d00988 commit 6cdcf80
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ethdb/dbtest/testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"testing"

"github.com/ethereum/go-ethereum/ethdb"
"golang.org/x/exp/slices"
)

// TestDatabaseSuite runs a suite of tests against a KeyValueStore database
Expand Down Expand Up @@ -527,7 +526,7 @@ func makeDataset(size, ksize, vsize int, order bool) ([][]byte, [][]byte) {
vals = append(vals, randBytes(vsize))
}
if order {
slices.SortFunc(keys, func(a, b []byte) bool { return bytes.Compare(a, b) < 0 })
sort.Slice(keys, func(i, j int) bool { return bytes.Compare(keys[i], keys[j]) < 0 })
}
return keys, vals
}

0 comments on commit 6cdcf80

Please sign in to comment.