Skip to content

Commit 6b37337

Browse files
committed
Move comment explaining to_pk_ctx to more sensible place
Since max_satisfaction_weight no longer takes it
1 parent 3e37e68 commit 6b37337

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/sign_multisig.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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)),

0 commit comments

Comments
 (0)