Skip to content

Commit 7ef4fdc

Browse files
committed
Enforce that x-only keys cannot be used in non-tr descriptors
Reported by: @affilini
1 parent d8cc633 commit 7ef4fdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/descriptor/key.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,9 +705,9 @@ impl MiniscriptKey for DescriptorPublicKey {
705705
fn is_x_only_key(&self) -> bool {
706706
match self {
707707
DescriptorPublicKey::SinglePub(DescriptorSinglePub {
708-
key: SinglePubKey::FullKey(ref key),
708+
key: SinglePubKey::XOnly(ref _key),
709709
..
710-
}) => key.is_x_only_key(),
710+
}) => true,
711711
_ => false,
712712
}
713713
}

0 commit comments

Comments
 (0)