Skip to content

Commit

Permalink
Empty InProgress Authentication for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
hhanh00 committed May 1, 2023
1 parent cba7463 commit fa4ec31
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/builder.rs
Expand Up @@ -24,6 +24,7 @@ use crate::{
tree::{Anchor, MerklePath},
value::{self, NoteValue, OverflowError, ValueCommitTrapdoor, ValueCommitment, ValueSum},
};
use crate::primitives::redpallas::SigningKey;

const MIN_ACTIONS: usize = 2;

Expand Down Expand Up @@ -492,6 +493,16 @@ pub struct Unproven {
circuits: Vec<Circuit>,
}

impl InProgress<Unproven, Unauthorized> {
/// Create an empty authorization bundle (for testing)
pub fn empty() -> Self {
Self {
proof: Unproven { circuits: vec![] },
sigs: Unauthorized { bsk: SigningKey::<Binding>::try_from([0; 32]).unwrap() }
}
}
}

impl<S: InProgressSignatures> InProgress<Unproven, S> {
/// Creates the proof for this bundle.
pub fn create_proof(
Expand Down

0 comments on commit fa4ec31

Please sign in to comment.