Function storage_proofs_core::gadgets::insertion::pick

source ยท
pub fn pick<Scalar: PrimeField, CS>(
    cs: CS,
    condition: &Boolean,
    a: &AllocatedNum<Scalar>,
    b: &AllocatedNum<Scalar>,
) -> Result<AllocatedNum<Scalar>, SynthesisError>
where CS: ConstraintSystem<Scalar>,
Expand description

Takes two allocated numbers (a, b) and returns a if the condition is true, and b otherwise.