add conversions from TXIDs to merkle nodes

This commit is contained in:
conduition 2023-11-27 00:12:16 +00:00
parent cfa6768e79
commit 32eb461523
1 changed files with 13 additions and 1 deletions

View File

@ -94,4 +94,16 @@ mod newtypes {
impl_hashencode!(FilterHash); impl_hashencode!(FilterHash);
impl_hashencode!(FilterHeader); impl_hashencode!(FilterHeader);
impl From<Txid> for TxMerkleNode {
fn from(txid: Txid) -> Self {
Self::from(txid.0)
}
}
impl From<Wtxid> for WitnessMerkleNode {
fn from(wtxid: Wtxid) -> Self {
Self::from(wtxid.0)
}
}
} }