Skip to content

Commit edc583c

Browse files
committed
Fix traproot.rs example
1 parent fa2e4e2 commit edc583c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/taproot.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ fn main() {
116116

117117
// Max Satisfaction Weight for compilation, corresponding to the script-path spend
118118
// `multi_a(2,PUBKEY_1,PUBKEY_2) at taptree depth 1, having
119-
// Max Witness Size = scriptSig len + control_block size + varint(script_size) + script_size +
120-
// varint(max satisfaction elements) + max satisfaction size
121-
// = 4 + 65 + 1 + 70 + 1 + 132
119+
// Max Witness Size = scriptSig len + witnessStack len + varint(control_block_size) +
120+
// control_block size + varint(script_size) + script_size + max_satisfaction_size
121+
// = 4 + 1 + 1 + 65 + 1 + 70 + 132 = 274
122122
let max_sat_wt = real_desc.max_satisfaction_weight().unwrap();
123-
assert_eq!(max_sat_wt, 273);
123+
assert_eq!(max_sat_wt, 274);
124124

125125
// Compute the bitcoin address and check if it matches
126126
let network = Network::Bitcoin;

0 commit comments

Comments
 (0)