TaprootBuilder::has_hidden_nodes method
This commit is contained in:
parent
e69701e089
commit
56adfa4527
|
@ -466,6 +466,18 @@ impl TaprootBuilder {
|
||||||
self.branch.len() == 1 && self.branch[0].is_some()
|
self.branch.len() == 1 && self.branch[0].is_some()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Checks if the builder has hidden nodes.
|
||||||
|
pub fn has_hidden_nodes(&self) -> bool {
|
||||||
|
for node in &self.branch {
|
||||||
|
if let Some(node) = node {
|
||||||
|
if node.has_hidden_nodes {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
/// Creates a [`TaprootSpendInfo`] with the given internal key.
|
/// Creates a [`TaprootSpendInfo`] with the given internal key.
|
||||||
pub fn finalize<C: secp256k1::Verification>(
|
pub fn finalize<C: secp256k1::Verification>(
|
||||||
mut self,
|
mut self,
|
||||||
|
|
Loading…
Reference in New Issue