mirror of https://github.com/zcash/halo2.git
Merge pull request #81 from nuttycom/bundle_clone
Make the `Bundle` type implement `Clone`
This commit is contained in:
commit
1a761cb03f
|
@ -18,7 +18,7 @@ use crate::{
|
|||
///
|
||||
/// Internally, this may both consume a note and create a note, or it may do only one of
|
||||
/// the two. TODO: Determine which is more efficient (circuit size vs bundle size).
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Action<A> {
|
||||
/// The nullifier of the note being spent.
|
||||
nf: Nullifier,
|
||||
|
@ -173,7 +173,7 @@ pub trait Authorization {
|
|||
}
|
||||
|
||||
/// A bundle of actions to be applied to the ledger.
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Bundle<T: Authorization, V> {
|
||||
/// The list of actions that make up this bundle.
|
||||
actions: NonEmpty<Action<T::SpendAuth>>,
|
||||
|
@ -301,7 +301,7 @@ impl<T: Authorization, V> Bundle<T, V> {
|
|||
}
|
||||
|
||||
/// Authorizing data for a bundle of actions, ready to be committed to the ledger.
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Authorized {
|
||||
proof: Proof,
|
||||
binding_signature: redpallas::Signature<Binding>,
|
||||
|
|
|
@ -116,7 +116,7 @@ impl Instance {
|
|||
/// A proof of the validity of an Orchard [`Bundle`].
|
||||
///
|
||||
/// [`Bundle`]: crate::bundle::Bundle
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Proof(Vec<u8>);
|
||||
|
||||
impl AsRef<[u8]> for Proof {
|
||||
|
|
|
@ -135,7 +135,7 @@ impl Note {
|
|||
}
|
||||
|
||||
/// An encrypted note.
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct TransmittedNoteCiphertext {
|
||||
/// The serialization of the ephemeral public key
|
||||
pub epk_bytes: [u8; 32],
|
||||
|
|
|
@ -93,7 +93,7 @@ impl VerificationKey<SpendAuth> {
|
|||
}
|
||||
|
||||
/// A RedPallas signature.
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Signature<T: SigType>(reddsa::Signature<T>);
|
||||
|
||||
impl<T: SigType> From<[u8; 64]> for Signature<T> {
|
||||
|
|
Loading…
Reference in New Issue