Skip to content

Commit

Permalink
Merge #602: Document And/Or vectors contain 2 elements
Browse files Browse the repository at this point in the history
47c8776 Document And/Or vectors contain 2 elements (Tobin C. Harding)

Pull request description:

  It is not immediately obvious that the `Concrete::And` and `Or` vectors contain exactly 2 elements, add code comment to document it.

ACKs for top commit:
  apoelstra:
    ACK 47c8776

Tree-SHA512: 477c1a3b36a4c5632f35433cbcb4bcafb4d005acdff6a82785ee7c175aa243ce87439c8c6d71859face17035fc75ba232d2b42854edc7194b9b99134168dac34
  • Loading branch information
sanket1729 committed Sep 27, 2023
2 parents c42b1cb + 47c8776 commit f8717e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/policy/concrete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ const MAX_COMPILATION_LEAVES: usize = 1024;
/// Concrete policy which corresponds directly to a miniscript structure,
/// and whose disjunctions are annotated with satisfaction probabilities
/// to assist the compiler.
// Currently the vectors in And/Or are limited to two elements, this is a general miniscript thing
// not specific to rust-miniscript. Eventually we would like to extend these to be n-ary, but first
// we need to decide on a game plan for how to efficiently compile n-ary disjunctions
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum Policy<Pk: MiniscriptKey> {
/// Unsatisfiable.
Expand Down

0 comments on commit f8717e4

Please sign in to comment.