Skip to content

Commit f3ae0d8

Browse files
committed
Fix pk_len() for BareCtx
The `pk_len()` returned should account for the extra byte for the OP_PUSH opcode. This is true for all the other contexts, but not for `BareCtx`, so this commit fixes it.
1 parent 65a8ea8 commit f3ae0d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/miniscript/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,9 +739,9 @@ impl ScriptContext for BareCtx {
739739

740740
fn pk_len<Pk: MiniscriptKey>(pk: &Pk) -> usize {
741741
if pk.is_uncompressed() {
742-
65
742+
66
743743
} else {
744-
33
744+
34
745745
}
746746
}
747747

0 commit comments

Comments
 (0)