File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -83,16 +83,16 @@ fn main() {
8383 let my_descriptor =
8484 BitcoinDescriptor :: from_str ( & descriptor_str[ ..] ) . expect ( "parse descriptor string" ) ;
8585
86- // Sometimes it is necessary to have additional information to get the bitcoin::PublicKey
87- // from the MiniscriptKey which can supplied by `to_pk_ctx` parameter. For example,
88- // when calculating the script pubkey of a descriptor with xpubs, the secp context and
89- // child information maybe required.
90-
9186 // Check weight for witness satisfaction cost ahead of time.
9287 // 4(scriptSig length of 0) + 1(witness stack size) + 106(serialized witnessScript)
9388 // + 73*2(signature length + signatures + sighash bytes) + 1(dummy byte) = 258
9489 assert_eq ! ( my_descriptor. max_satisfaction_weight( ) . unwrap( ) , 258 ) ;
9590
91+ // Sometimes it is necessary to have additional information to get the bitcoin::PublicKey
92+ // from the MiniscriptKey which can supplied by `to_pk_ctx` parameter. For example,
93+ // when calculating the script pubkey of a descriptor with xpubs, the secp context and
94+ // child information maybe required.
95+
9696 // Observe the script properties, just for fun
9797 assert_eq ! (
9898 format!( "{:x}" , my_descriptor. script_pubkey( NullCtx ) ) ,
You can’t perform that action at this time.
0 commit comments