BIP32 KeySource refactored to type aliace
This commit is contained in:
parent
aa67f10162
commit
c098dfa7f2
|
@ -347,8 +347,7 @@ impl fmt::Debug for DerivationPath {
|
|||
|
||||
/// Full information on the used extended public key: fingerprint of the
|
||||
/// master extended public key and a derivation path from it.
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
|
||||
pub struct KeySource(pub Fingerprint, pub DerivationPath);
|
||||
pub type KeySource = (Fingerprint, DerivationPath);
|
||||
|
||||
/// A BIP32 error
|
||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||
|
|
|
@ -227,7 +227,7 @@ mod tests {
|
|||
|
||||
let pk: ExtendedPubKey = ExtendedPubKey::from_private(&secp, &sk);
|
||||
|
||||
hd_keypaths.insert(pk.public_key, KeySource(fprint, dpath.into()));
|
||||
hd_keypaths.insert(pk.public_key, (fprint, dpath.into()));
|
||||
|
||||
let expected: Output = Output {
|
||||
redeem_script: Some(hex_script!(
|
||||
|
|
|
@ -101,7 +101,7 @@ impl Deserialize for KeySource {
|
|||
}
|
||||
}
|
||||
|
||||
Ok(KeySource(fprint, dpath.into()))
|
||||
Ok((fprint, dpath.into()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue