Skip to content

Commit 66a4ce4

Browse files
author
Daniel Kuehr
committed
fix: replace unwrap for non-panicking code
1 parent 36a665b commit 66a4ce4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ledger/src/proofs/step.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,8 +1948,10 @@ pub fn expand_deferred(params: ExpandDeferredParams) -> Result<DeferredValues<Fp
19481948
let zeta = ScalarChallenge::limbs_to_field(&plonk0.zeta_bytes);
19491949
let alpha = ScalarChallenge::limbs_to_field(&plonk0.alpha_bytes);
19501950
let step_domain: u8 = proof_state.deferred_values.branch_data.domain_log2.as_u8();
1951-
let domain: Radix2EvaluationDomain<Fp> =
1952-
Radix2EvaluationDomain::new(1 << step_domain as u64).unwrap();
1951+
let Some(domain) = Radix2EvaluationDomain::<Fp>::new(1 << step_domain as u64) else {
1952+
return Err(InvalidBigInt);
1953+
};
1954+
19531955
let zetaw = zeta * domain.group_gen;
19541956

19551957
let plonk_minimal = PlonkMinimal::<Fp, 4> {

0 commit comments

Comments
 (0)