From 022256c91ac7a4d9324a1a7925394a948feec808 Mon Sep 17 00:00:00 2001 From: Lloyd Fournier Date: Thu, 13 Jan 2022 15:31:52 +1100 Subject: [PATCH] Fix comment on peek_address Co-authored-by: Raj <36541669+rajarshimaitra@users.noreply.github.com> --- src/wallet/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wallet/mod.rs b/src/wallet/mod.rs index 28c2129e..05f55166 100644 --- a/src/wallet/mod.rs +++ b/src/wallet/mod.rs @@ -237,7 +237,7 @@ impl Wallet where D: BatchDatabase, { - // Return a newly derived address using the external descriptor + // Return a newly derived address for the specified `keychain`. fn get_new_address(&self, keychain: KeychainKind) -> Result { let incremented_index = self.fetch_and_increment_index(keychain)?; @@ -254,8 +254,8 @@ where .map_err(|_| Error::ScriptDoesntHaveAddressForm) } - // Return the the last previously derived address if it has not been used in a received - // transaction. Otherwise return a new address using [`Wallet::get_new_address`]. + // Return the the last previously derived address for `keychain` if it has not been used in a + // received transaction. Otherwise return a new address using [`Wallet::get_new_address`]. fn get_unused_address(&self, keychain: KeychainKind) -> Result { let current_index = self.fetch_index(keychain)?; @@ -285,7 +285,7 @@ where } } - // Return derived address for the external descriptor at a specific index + // Return derived address for the descriptor of given [`KeychainKind`] at a specific index fn peek_address(&self, index: u32, keychain: KeychainKind) -> Result { self.get_descriptor_for_keychain(keychain) .as_derived(index, &self.secp) @@ -294,7 +294,7 @@ where .map_err(|_| Error::ScriptDoesntHaveAddressForm) } - // Return derived address for the external descriptor at a specific index and reset current + // Return derived address for `keychain` at a specific index and reset current // address index fn reset_address(&self, index: u32, keychain: KeychainKind) -> Result { self.set_index(keychain, index)?;