From 6cdcf809964a99e232dba0a8cdd43e2ebb52fa26 Mon Sep 17 00:00:00 2001 From: devopsbo3 <69951731+devopsbo3@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:31:54 -0600 Subject: [PATCH] Revert "ethdb/dbtest: use slices package for sorting (#27491)" This reverts commit 42aebf39657c0252a1314f6a4bc4f89fba9ed722. --- ethdb/dbtest/testsuite.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ethdb/dbtest/testsuite.go b/ethdb/dbtest/testsuite.go index ac10ddde93b2..d82dbd699282 100644 --- a/ethdb/dbtest/testsuite.go +++ b/ethdb/dbtest/testsuite.go @@ -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 @@ -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 }