Skip to content

Commit 5997cf6

Browse files
authored
Merge pull request #160 from darosior/desc_pubkey_fixups
Descriptor pubkeys fixups
2 parents 8e47d31 + 6b0e0ea commit 5997cf6

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/descriptor/mod.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
//! these with BIP32 paths, pay-to-contract instructions, etc.
2424
//!
2525
26-
use std::fmt;
2726
use std::str::{self, FromStr};
27+
use std::{error, fmt};
2828

2929
use bitcoin::blockdata::{opcodes, script};
3030
use bitcoin::hashes::hash160;
@@ -104,6 +104,16 @@ impl fmt::Display for DescriptorKeyParseError {
104104
}
105105
}
106106

107+
impl error::Error for DescriptorKeyParseError {
108+
fn description(&self) -> &str {
109+
""
110+
}
111+
112+
fn cause(&self) -> Option<&error::Error> {
113+
None
114+
}
115+
}
116+
107117
impl fmt::Display for DescriptorPublicKey {
108118
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
109119
match *self {

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ use std::{error, fmt, hash, str};
103103
use bitcoin::blockdata::{opcodes, script};
104104
use bitcoin::hashes::{hash160, sha256, Hash};
105105

106-
pub use descriptor::{Descriptor, SatisfiedConstraints};
106+
pub use descriptor::{Descriptor, DescriptorPublicKey, SatisfiedConstraints};
107107
pub use miniscript::context::{Legacy, ScriptContext, Segwitv0};
108108
pub use miniscript::decode::Terminal;
109109
pub use miniscript::satisfy::{BitcoinSig, Satisfier};

0 commit comments

Comments
 (0)