triedb/pathdb: use slices.Sort in tests

This commit is contained in:
Lessa 2026-01-16 02:05:25 -05:00 committed by GitHub
parent 23c3498836
commit 44ebbde9a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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++ {