Skip to content

Commit

Permalink
replaced cfg! call with attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanyli committed Jul 31, 2023
1 parent 3d0b11a commit ca3c6ae
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions sunscreen_zkp_backend/src/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,16 +377,17 @@ where
Operation::Constraint(x) => {
// Constraints produce no outputs, but verify it's met.
let parents = query.get_unordered_operands(id)?;

for parent in parents {
let actual = node_outputs[&parent].clone().zkp_into();
if actual != x {
if cfg!(feature = "debugger") {
#[cfg(feature = "debugger")]
{
unsatisfied_constraint = Some(id);
node_outputs.insert(id, U::try_from(BigInt::from(1u32)).unwrap());
} else {
return Err(Error::UnsatisfiableConstraint(id));
}
}
#[cfg(not(feature = "debugger"))]
return Err(Error::UnsatisfiableConstraint(id));
}
}
}
Expand Down

0 comments on commit ca3c6ae

Please sign in to comment.