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() {
83
83
let my_descriptor =
84
84
BitcoinDescriptor :: from_str ( & descriptor_str[ ..] ) . expect ( "parse descriptor string" ) ;
85
85
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
-
91
86
// Check weight for witness satisfaction cost ahead of time.
92
87
// 4(scriptSig length of 0) + 1(witness stack size) + 106(serialized witnessScript)
93
88
// + 73*2(signature length + signatures + sighash bytes) + 1(dummy byte) = 258
94
89
assert_eq ! ( my_descriptor. max_satisfaction_weight( ) . unwrap( ) , 258 ) ;
95
90
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
+
96
96
// Observe the script properties, just for fun
97
97
assert_eq ! (
98
98
format!( "{:x}" , my_descriptor. script_pubkey( NullCtx ) ) ,
You can’t perform that action at this time.
0 commit comments