Skip to content

Commit 47c8776

Browse files
committed
Document And/Or vectors contain 2 elements
It is not immediately obvious that the `Concrete::And` and `Or` vectors contain exactly 2 elements, add code comment to document it.
1 parent 3c6ae26 commit 47c8776

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/policy/concrete.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ const MAX_COMPILATION_LEAVES: usize = 1024;
3737
/// Concrete policy which corresponds directly to a miniscript structure,
3838
/// and whose disjunctions are annotated with satisfaction probabilities
3939
/// to assist the compiler.
40+
// Currently the vectors in And/Or are limited to two elements, this is a general miniscript thing
41+
// not specific to rust-miniscript. Eventually we would like to extend these to be n-ary, but first
42+
// we need to decide on a game plan for how to efficiently compile n-ary disjunctions
4043
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4144
pub enum Policy<Pk: MiniscriptKey> {
4245
/// Unsatisfiable.

0 commit comments

Comments
 (0)