@@ -237,7 +237,7 @@ impl<B, D> Wallet<B, D>
237
237
where
238
238
D : BatchDatabase ,
239
239
{
240
- // Return a newly derived address using the external descriptor
240
+ // Return a newly derived address for the specified `keychain`.
241
241
fn get_new_address ( & self , keychain : KeychainKind ) -> Result < AddressInfo , Error > {
242
242
let incremented_index = self . fetch_and_increment_index ( keychain) ?;
243
243
@@ -254,8 +254,8 @@ where
254
254
. map_err ( |_| Error :: ScriptDoesntHaveAddressForm )
255
255
}
256
256
257
- // Return the the last previously derived address if it has not been used in a received
258
- // transaction. Otherwise return a new address using [`Wallet::get_new_address`].
257
+ // Return the the last previously derived address for `keychain` if it has not been used in a
258
+ // received transaction. Otherwise return a new address using [`Wallet::get_new_address`].
259
259
fn get_unused_address ( & self , keychain : KeychainKind ) -> Result < AddressInfo , Error > {
260
260
let current_index = self . fetch_index ( keychain) ?;
261
261
@@ -285,7 +285,7 @@ where
285
285
}
286
286
}
287
287
288
- // Return derived address for the external descriptor at a specific index
288
+ // Return derived address for the descriptor of given [`KeychainKind`] at a specific index
289
289
fn peek_address ( & self , index : u32 , keychain : KeychainKind ) -> Result < AddressInfo , Error > {
290
290
self . get_descriptor_for_keychain ( keychain)
291
291
. as_derived ( index, & self . secp )
@@ -294,7 +294,7 @@ where
294
294
. map_err ( |_| Error :: ScriptDoesntHaveAddressForm )
295
295
}
296
296
297
- // Return derived address for the external descriptor at a specific index and reset current
297
+ // Return derived address for `keychain` at a specific index and reset current
298
298
// address index
299
299
fn reset_address ( & self , index : u32 , keychain : KeychainKind ) -> Result < AddressInfo , Error > {
300
300
self . set_index ( keychain, index) ?;
0 commit comments