3.7.3 Add multiexp tests

This commit is contained in:
Luke Parker
2023-03-02 03:58:48 -05:00
parent 93d5f41917
commit 8661111fc6
4 changed files with 144 additions and 3 deletions

View File

@@ -130,6 +130,14 @@ where
// If 1 and 2 were valid, this would've only taken 2 rounds to complete
// To prevent this from being gamed, if there's an odd number of elements, randomize which
// side the split occurs on
// This does risk breaking determinism
// The concern is if the select split point causes different paths to be taken when multiple
// invalid elements exist
// While the split point may move an element from the right to the left, always choosing the
// left side (if it's invalid) means this will still always return the left-most,
// invalid element
if slice.len() % 2 == 1 {
split += usize::try_from(split_side & 1).unwrap();
split_side >>= 1;