mirror of https://github.com/zcash/halo2.git
Enforce in type system that a Bundle contains at least one Action
This commit is contained in:
parent
693587a402
commit
97d75bab9a
|
@ -20,6 +20,7 @@ rustdoc-args = [ "--html-in-header", "katex-header.html" ]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
halo2 = { git = "https://github.com/zcash/halo2.git", branch = "main" }
|
halo2 = { git = "https://github.com/zcash/halo2.git", branch = "main" }
|
||||||
|
nonempty = "0.6"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
criterion = "0.3"
|
criterion = "0.3"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
//! Structs related to bundles of Orchard actions.
|
//! Structs related to bundles of Orchard actions.
|
||||||
|
|
||||||
|
use nonempty::NonEmpty;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
circuit::Proof,
|
circuit::Proof,
|
||||||
note::{EncryptedNote, NoteCommitment, Nullifier},
|
note::{EncryptedNote, NoteCommitment, Nullifier},
|
||||||
|
@ -36,7 +38,7 @@ pub struct Action {
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Bundle {
|
pub struct Bundle {
|
||||||
anchor: Anchor,
|
anchor: Anchor,
|
||||||
actions: Vec<Action>,
|
actions: NonEmpty<Action>,
|
||||||
value_balance: ValueSum,
|
value_balance: ValueSum,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue