]> Untitled Git - bdk/commitdiff
Fix comment on peek_address github/get_change_address
authorLloyd Fournier <LLFourn@users.noreply.github.com>
Thu, 13 Jan 2022 04:31:52 +0000 (15:31 +1100)
committerLLFourn <lloyd.fourn@gmail.com>
Tue, 22 Feb 2022 22:28:13 +0000 (09:28 +1100)
Co-authored-by: Raj <36541669+rajarshimaitra@users.noreply.github.com>
src/wallet/mod.rs

index 28c2129e5fa4874fca58f57a8dd02cca6b257532..05f55166205accaf7fa2f843690ad5a6dd0b70b4 100644 (file)
@@ -237,7 +237,7 @@ impl<B, D> Wallet<B, D>
 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<AddressInfo, Error> {
         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<AddressInfo, Error> {
         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<AddressInfo, Error> {
         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<AddressInfo, Error> {
         self.set_index(keychain, index)?;