From: Alekos Filini Date: Wed, 16 Dec 2020 10:11:38 +0000 (+0100) Subject: Merge commit 'refs/pull/223/head' of github.com:bitcoindevkit/bdk X-Git-Tag: v0.2.0~15 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/enum.NetworkMessage.html?a=commitdiff_plain;h=5f373180ff01abe85bb42b6e4b5f7328834b6da6;p=bdk Merge commit 'refs/pull/223/head' of github.com:bitcoindevkit/bdk --- 5f373180ff01abe85bb42b6e4b5f7328834b6da6 diff --cc src/wallet/signer.rs index dde2e1a6,6ddf4162..76dafd30 --- a/src/wallet/signer.rs +++ b/src/wallet/signer.rs @@@ -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>); +pub struct SignersContainer(BTreeMap>); impl SignersContainer { + /// Create a map of public keys to secret keys pub fn as_key_map(&self, secp: &SecpCtx) -> KeyMap { self.0 .values()