@@ -244,10 +244,14 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
244
244
/// The policy tree constructed by root-level disjunctions over [`Or`][`Policy::Or`] and
245
245
/// [`Thresh`][`Policy::Threshold`](1, ..) which is flattened into a vector (with respective
246
246
/// probabilities derived from odds) of policies.
247
- /// For example, the policy `thresh(1,or(pk(A),pk(B)),and(or(pk(C),pk(D)),pk(E)))` gives the vector
248
- /// `[pk(A),pk(B),and(or(pk(C),pk(D)),pk(E)))]`. Each policy in the vector is compiled into
249
- /// the respective miniscripts. A Huffman Tree is created from this vector which optimizes over
250
- /// the probabilitity of satisfaction for the respective branch in the TapTree.
247
+ /// For example, the policy `thresh(1,or(pk(A),pk(B)),and(or(pk(C),pk(D)),pk(E)))` gives the
248
+ /// vector `[pk(A),pk(B),and(or(pk(C),pk(D)),pk(E)))]`. Each policy in the vector is compiled
249
+ /// into the respective miniscripts. A Huffman Tree is created from this vector which optimizes
250
+ /// over the probabilitity of satisfaction for the respective branch in the TapTree.
251
+ ///
252
+ /// Refer to [this link](https://gist.github.com/SarcasticNastik/9e70b2b43375aab3e78c51e09c288c89)
253
+ /// or [doc/Tr compiler.pdf] in the root of the repository to understand why such compilation
254
+ /// is also *cost-efficient*.
251
255
// TODO: We might require other compile errors for Taproot.
252
256
#[ cfg( feature = "compiler" ) ]
253
257
pub fn compile_tr ( & self , unspendable_key : Option < Pk > ) -> Result < Descriptor < Pk > , Error > {
0 commit comments