Skip to content

Commit

Permalink
Ensure that we only create proofs on PCZTs with at least one action
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed Dec 10, 2024
1 parent c276fd6 commit 8643c5c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pczt/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ impl super::Bundle {
pk: &ProvingKey,
rng: R,
) -> Result<(), ProverError> {
// If we have no actions, we don't need a proof (and if we still have no actions
// by the time we come to transaction extraction, we will end up with a `None`
// bundle that doesn't even hold a proof field).
if self.actions.is_empty() {
return Ok(());
}

let circuits = self
.actions
.iter()
Expand Down

0 comments on commit 8643c5c

Please sign in to comment.