Fix a minor naming error in AccountPubKey

This commit is contained in:
Kris Nuttycombe 2022-01-21 19:08:26 -07:00
parent 7d873e9d79
commit 15eb5aab50
3 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,7 @@ pub mod transparent {
impl AccountPubKey {
/// Derive BIP-44 public key at the external child path
/// `m/44'/<coin_type>'/<account>'/0/<child_index>
pub fn to_external_pubkey(
pub fn derive_external_pubkey(
&self,
child_index: u32,
) -> Result<ExternalPubKey, hdwallet::error::Error> {

View File

@ -771,7 +771,7 @@ mod tests {
init_accounts_table(db_data, &[ufvk]).unwrap();
(
extfvk,
tkey.map(|k| k.to_external_pubkey(0).unwrap().to_address()),
tkey.map(|k| k.derive_external_pubkey(0).unwrap().to_address()),
)
}

View File

@ -205,7 +205,7 @@ pub fn init_accounts_table<P: consensus::Parameters>(
.map(|extfvk| address_from_extfvk(&wdb.params, extfvk));
#[cfg(feature = "transparent-inputs")]
let taddress_str: Option<String> = key.transparent().and_then(|k| {
k.to_external_pubkey(0)
k.derive_external_pubkey(0)
.ok()
.map(|k| k.to_address().encode(&wdb.params))
});