From 590da5101ba919f9160e66b654924f99cf9d9648 Mon Sep 17 00:00:00 2001 From: ShuangWu121 <47602565+ShuangWu121@users.noreply.github.com> Date: Thu, 3 Oct 2024 15:35:06 +0200 Subject: [PATCH] Update executor/src/witgen/global_constraints.rs Co-authored-by: Georg Wiese --- executor/src/witgen/global_constraints.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/executor/src/witgen/global_constraints.rs b/executor/src/witgen/global_constraints.rs index 7a8eb7db4..a8a3364f3 100644 --- a/executor/src/witgen/global_constraints.rs +++ b/executor/src/witgen/global_constraints.rs @@ -366,13 +366,7 @@ fn smallest_period_candidate(fixed: &[T]) -> Option { if fixed.first() != Some(&0.into()) { return None; } - - // Handle the special case where last == 0 in Mersenne31 field, which is equivalent to 2^31 - 1 - if fixed.last() == Some(&0.into()) { - return None; - } - - (1..63).find(|bit| fixed.last() == Some(&((1u64 << bit) - 1).into())) + (1..T::BITS as u64).find(|bit| fixed.last() == Some(&((1u64 << bit) - 1).into())) } #[cfg(test)]