Revert 1.21 changes #995
1 changed files with 2 additions and 3 deletions
|
@ -5,7 +5,6 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"slices"
|
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/constants"
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/constants"
|
||||||
|
@ -447,7 +446,7 @@ func getCIDFilterFunc(cmd *cobra.Command) (func([]byte) bool, error) {
|
||||||
var id cid.ID
|
var id cid.ID
|
||||||
id.SetSHA256(v)
|
id.SetSHA256(v)
|
||||||
idStr := id.EncodeToString()
|
idStr := id.EncodeToString()
|
||||||
_, found := slices.BinarySearch(rawIDs, idStr)
|
n := sort.Search(len(rawIDs), func(i int) bool { return rawIDs[i] >= idStr })
|
||||||
return found
|
return n < len(rawIDs) && rawIDs[n] == idStr
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue