mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-20 11:46:44 +00:00
triedb/pathdb: use slices.Sort in tests
This commit is contained in:
parent
23c3498836
commit
44ebbde9a0
1 changed files with 2 additions and 2 deletions
|
|
@ -62,7 +62,7 @@ func makeTestIndexBlock(count int, bitmapSize int) ([]byte, []uint64, [][]uint16
|
|||
marks[n] = true
|
||||
elements = append(elements, n)
|
||||
}
|
||||
sort.Slice(elements, func(i, j int) bool { return elements[i] < elements[j] })
|
||||
slices.Sort(elements)
|
||||
|
||||
for i := 0; i < len(elements); i++ {
|
||||
ext := randomExt(bitmapSize, 5)
|
||||
|
|
@ -88,7 +88,7 @@ func makeTestIndexBlocks(db ethdb.KeyValueStore, stateIdent stateIdent, count in
|
|||
marks[n] = true
|
||||
elements = append(elements, n)
|
||||
}
|
||||
sort.Slice(elements, func(i, j int) bool { return elements[i] < elements[j] })
|
||||
slices.Sort(elements)
|
||||
|
||||
iw, _ := newIndexWriter(db, stateIdent, 0, bitmapSize)
|
||||
for i := 0; i < len(elements); i++ {
|
||||
|
|
|
|||
Loading…
Reference in a new issue