Skip to content

Commit

Permalink
Merge pull request #2302 from AleoHQ/avoid_panic_reindex_by_subdomain
Browse files Browse the repository at this point in the history
Avoid panic in reindex_by_subdomain
  • Loading branch information
howardwu authored Jan 15, 2024
2 parents 80a5e6b + b58d8b9 commit 5602bef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion algorithms/src/fft/domain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ impl<F: FftField> EvaluationDomain<F> {
/// Given an index in the `other` subdomain, return an index into this domain `self`
/// This assumes the `other`'s elements are also `self`'s first elements
pub fn reindex_by_subdomain(&self, other: &Self, index: usize) -> Result<usize> {
ensure!(self.size() >= other.size(), "other.size() must be smaller than self.size()");
ensure!(self.size() > other.size(), "other.size() must be smaller than self.size()");

// Let this subgroup be G, and the subgroup we're re-indexing by be S.
// Since its a subgroup, the 0th element of S is at index 0 in G, the first element of S is at
Expand Down

0 comments on commit 5602bef

Please sign in to comment.