Skip to content

Commit

Permalink
Run rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby authored and redshiftzero committed May 30, 2024
1 parent 60952ce commit e70b7a6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/core/keys/src/keys/ivk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,18 @@ impl IncomingViewingKeyVar {

// Constraint: a = 4 => ivk_mod_r < q - 4 * mod_r
let is_less_than_q_minus_4_mod_r = ivk_mod_r.is_cmp(
&FqVar::new_constant(cs.clone(), -Fq::from(MOD_R_QUOTIENT as u64) * Fq::from(r_modulus))?,
&FqVar::new_constant(
cs.clone(),
-Fq::from(MOD_R_QUOTIENT as u64) * Fq::from(r_modulus),
)?,
core::cmp::Ordering::Less,
false,
)?;
let overflows = a_var
.is_eq(&FqVar::new_constant(cs.clone(), &Fq::from(MOD_R_QUOTIENT as u64))?)?
.is_eq(&FqVar::new_constant(
cs.clone(),
&Fq::from(MOD_R_QUOTIENT as u64),
)?)?
.and(&is_less_than_q_minus_4_mod_r.not())?;
overflows.enforce_equal(&Boolean::FALSE)?;

Expand Down

0 comments on commit e70b7a6

Please sign in to comment.