]> Untitled Git - bdk/commitdiff
update changelog and fix docs
authorRiccardo Casatta <riccardo@casatta.it>
Tue, 9 Mar 2021 15:59:27 +0000 (16:59 +0100)
committerRiccardo Casatta <riccardo@casatta.it>
Wed, 17 Mar 2021 10:24:48 +0000 (11:24 +0100)
CHANGELOG.md
src/descriptor/policy.rs

index 96d32ff98c34a31ff856ad529032ffae71080e15..e866a5acb942cae83445385971c782e8a9bf1e6b 100644 (file)
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
+### Descriptor
+#### Added
+- Added ability to analyze a `PSBT` to check which and how many signatures are already available
+
 ### Misc
 #### Changed
 - Updated `electrum-client` to version `0.7`
index f17bb247447ecec3d363045a5b46b15276e67610..181f23a682e69715414cbd8ed502b8a3d3193bac 100644 (file)
@@ -452,7 +452,7 @@ pub struct Policy {
     /// Type of this policy node
     #[serde(flatten)]
     pub item: SatisfiableItem,
-    /// How a much given PSBT already satisfies this polcy node **(currently unused)**
+    /// How much a given PSBT already satisfies this policy node in terms of signatures
     pub satisfaction: Satisfaction,
     /// How the wallet's descriptor can satisfy this policy node
     pub contribution: Satisfaction,
@@ -712,7 +712,7 @@ impl Policy {
         }
     }
 
-    /// fill self.satisfaction with what we already have in the PSBT
+    /// fill `self.satisfaction` with the signatures we already have in the PSBT
     pub fn fill_satisfactions(
         &mut self,
         psbt: &PSBT,
@@ -744,6 +744,7 @@ impl Policy {
             let mut index = 0;
             derived_desc.for_each_key(|k| {
                 if satisfier.lookup_sig(&k.as_key().to_public_key()).is_some() {
+                    //TODO check signature verifies
                     let _ = self.satisfaction.add(
                         &Satisfaction::Complete {
                             condition: Default::default(),