]> Untitled Git - bdk/commitdiff
Merge commit 'refs/pull/223/head' of github.com:bitcoindevkit/bdk
authorAlekos Filini <alekos.filini@gmail.com>
Wed, 16 Dec 2020 10:11:38 +0000 (11:11 +0100)
committerAlekos Filini <alekos.filini@gmail.com>
Wed, 16 Dec 2020 10:11:38 +0000 (11:11 +0100)
1  2 
src/wallet/signer.rs

index dde2e1a621f8e79db855b1375227f90753ac7f43,6ddf41623025400c18e5ff9c771c3f3c3ffc3568..76dafd3049ca6a5cf01e6b52e3119885144d42db
@@@ -112,9 -111,11 +112,11 @@@ use crate::descriptor::XKeyUtils
  
  /// Identifier of a signer in the `SignersContainers`. Used as a key to find the right signer among
  /// multiple of them
 -#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 +#[derive(Debug, Clone, Ord, PartialOrd, PartialEq, Eq, Hash)]
  pub enum SignerId {
+     /// Bitcoin HASH160 (RIPEMD160 after SHA256) hash of an ECDSA public key
      PkHash(hash160::Hash),
+     /// The fingerprint of a BIP32 extended key
      Fingerprint(Fingerprint),
  }
  
@@@ -322,9 -323,10 +324,10 @@@ impl From<(SignerId, SignerOrdering)> f
  
  /// Container for multiple signers
  #[derive(Debug, Default, Clone)]
 -pub struct SignersContainer(HashMap<SignersContainerKey, Arc<dyn Signer>>);
 +pub struct SignersContainer(BTreeMap<SignersContainerKey, Arc<dyn Signer>>);
  
  impl SignersContainer {
+     /// Create a map of public keys to secret keys
      pub fn as_key_map(&self, secp: &SecpCtx) -> KeyMap {
          self.0
              .values()