Skip to content

Commit ebed2f9

Browse files
authored
Merge pull request #221 from afilini/fix/is-uncompressed-descriptor-pk
descriptor: fix `is_uncompressed()` for `DescriptorPublicKey`
2 parents f03dc1e + 0b18d37 commit ebed2f9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/descriptor/key.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,15 @@ impl MiniscriptKey for DescriptorPublicKey {
651651
// This allows us to be able to derive public keys even for PkH s
652652
type Hash = Self;
653653

654+
fn is_uncompressed(&self) -> bool {
655+
match self {
656+
DescriptorPublicKey::SinglePub(DescriptorSinglePub { ref key, .. }) => {
657+
key.is_uncompressed()
658+
}
659+
_ => false,
660+
}
661+
}
662+
654663
fn to_pubkeyhash(&self) -> Self {
655664
self.clone()
656665
}

0 commit comments

Comments
 (0)