mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert "ethdb/dbtest: use slices package for sorting (#27491)"
This reverts commit 42aebf3965.
This commit is contained in:
parent
551e419676
commit
b85bbdbfd0
1 changed files with 1 additions and 2 deletions
|
|
@ -24,7 +24,6 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/ethdb"
|
"github.com/ethereum/go-ethereum/ethdb"
|
||||||
"golang.org/x/exp/slices"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestDatabaseSuite runs a suite of tests against a KeyValueStore database
|
// TestDatabaseSuite runs a suite of tests against a KeyValueStore database
|
||||||
|
|
@ -527,7 +526,7 @@ func makeDataset(size, ksize, vsize int, order bool) ([][]byte, [][]byte) {
|
||||||
vals = append(vals, randBytes(vsize))
|
vals = append(vals, randBytes(vsize))
|
||||||
}
|
}
|
||||||
if order {
|
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
|
return keys, vals
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue