mirror of https://github.com/zcash/orchard.git
commit
15007026b1
|
@ -583,9 +583,7 @@ impl<P: fmt::Debug, V> Bundle<InProgress<P, PartiallyAuthorized>, V> {
|
|||
self,
|
||||
signatures: &[redpallas::Signature<SpendAuth>],
|
||||
) -> Result<Self, Error> {
|
||||
signatures
|
||||
.into_iter()
|
||||
.try_fold(self, Self::append_signature)
|
||||
signatures.iter().try_fold(self, Self::append_signature)
|
||||
}
|
||||
|
||||
fn append_signature(self, signature: &redpallas::Signature<SpendAuth>) -> Result<Self, Error> {
|
||||
|
|
|
@ -88,8 +88,8 @@ pub(in crate::circuit) trait AddInstruction<F: FieldExt>: Chip<F> {
|
|||
/// Witnesses the given value in a standalone region.
|
||||
///
|
||||
/// Usages of this helper are technically superfluous, as the single-cell region is only
|
||||
/// ever used in equality constraints. We could eliminate them with a write-on-copy
|
||||
/// abstraction (https://github.com/zcash/halo2/issues/334).
|
||||
/// ever used in equality constraints. We could eliminate them with a
|
||||
/// [write-on-copy abstraction](https://github.com/zcash/halo2/issues/334).
|
||||
pub(in crate::circuit) fn assign_free_advice<F: Field, V: Copy>(
|
||||
mut layouter: impl Layouter<F>,
|
||||
column: Column<Advice>,
|
||||
|
|
|
@ -8,10 +8,10 @@ pub fn gen_const_array<Output: Copy + Default, const LEN: usize>(
|
|||
|
||||
pub(crate) fn gen_const_array_with_default<Output: Copy, const LEN: usize>(
|
||||
default_value: Output,
|
||||
mut closure: impl FnMut(usize) -> Output,
|
||||
closure: impl FnMut(usize) -> Output,
|
||||
) -> [Output; LEN] {
|
||||
let mut ret: [Output; LEN] = [default_value; LEN];
|
||||
for (bit, val) in ret.iter_mut().zip((0..LEN).map(|idx| closure(idx))) {
|
||||
for (bit, val) in ret.iter_mut().zip((0..LEN).map(closure)) {
|
||||
*bit = val;
|
||||
}
|
||||
ret
|
||||
|
|
|
@ -739,7 +739,7 @@ impl AsRef<[u8; 32]> for OutgoingViewingKey {
|
|||
/// Defined in [Zcash Protocol Spec § 4.2.3: Orchard Key Components][orchardkeycomponents].
|
||||
///
|
||||
/// [orchardkeycomponents]: https://zips.z.cash/protocol/nu5.pdf#orchardkeycomponents
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
|
||||
pub struct DiversifiedTransmissionKey(NonIdentityPallasPoint);
|
||||
|
||||
impl DiversifiedTransmissionKey {
|
||||
|
@ -772,13 +772,6 @@ impl DiversifiedTransmissionKey {
|
|||
}
|
||||
}
|
||||
|
||||
// Required for CtOption operations.
|
||||
impl Default for DiversifiedTransmissionKey {
|
||||
fn default() -> Self {
|
||||
DiversifiedTransmissionKey(NonIdentityPallasPoint::default())
|
||||
}
|
||||
}
|
||||
|
||||
impl ConditionallySelectable for DiversifiedTransmissionKey {
|
||||
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self {
|
||||
DiversifiedTransmissionKey(NonIdentityPallasPoint::conditional_select(
|
||||
|
|
Loading…
Reference in New Issue