From 9b31ae9153e590d06835f5e49ffb643116334c26 Mon Sep 17 00:00:00 2001 From: LLFourn Date: Tue, 15 Dec 2020 08:39:19 +1100 Subject: [PATCH] Fix doc comment fallout from s/script type/keychain --- src/database/mod.rs | 22 +++++++++++----------- src/wallet/tx_builder.rs | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/database/mod.rs b/src/database/mod.rs index 7c48783a..33ec7ccf 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -57,7 +57,7 @@ pub use memory::MemoryDatabase; /// This trait defines the list of operations that must be implemented on the [`Database`] type and /// the [`BatchDatabase::Batch`] type. pub trait BatchOperations { - /// Store a script_pubkey along with its script type and child number + /// Store a script_pubkey along with its keychain and child number. fn set_script_pubkey( &mut self, script: &Script, @@ -70,17 +70,17 @@ pub trait BatchOperations { fn set_raw_tx(&mut self, transaction: &Transaction) -> Result<(), Error>; /// Store the metadata of a transaction fn set_tx(&mut self, transaction: &TransactionDetails) -> Result<(), Error>; - /// Store the last derivation index for a given script type + /// Store the last derivation index for a given keychain. fn set_last_index(&mut self, keychain: KeychainKind, value: u32) -> Result<(), Error>; - /// Delete a script_pubkey given the script type and its child number + /// Delete a script_pubkey given the keychain and its child number. fn del_script_pubkey_from_path( &mut self, keychain: KeychainKind, child: u32, ) -> Result, Error>; - /// Delete the data related to a specific script_pubkey, meaning the script type and the child - /// number + /// Delete the data related to a specific script_pubkey, meaning the keychain and the child + /// number. fn del_path_from_script_pubkey( &mut self, script: &Script, @@ -95,7 +95,7 @@ pub trait BatchOperations { txid: &Txid, include_raw: bool, ) -> Result, Error>; - /// Delete the last derivation index for a script type + /// Delete the last derivation index for a keychain. fn del_last_index(&mut self, keychain: KeychainKind) -> Result, Error>; } @@ -103,7 +103,7 @@ pub trait BatchOperations { /// /// This traits defines the operations that can be used to read data out of a database pub trait Database: BatchOperations { - /// Read and checks the descriptor checksum for a given script type + /// Read and checks the descriptor checksum for a given keychain. /// /// Should return [`Error::ChecksumMismatch`](crate::error::Error::ChecksumMismatch) if the /// checksum doesn't match. If there's no checksum in the database, simply store it for the @@ -123,13 +123,13 @@ pub trait Database: BatchOperations { /// Return the list of transactions metadata fn iter_txs(&self, include_raw: bool) -> Result, Error>; - /// Fetch a script_pubkey given the script type and child number + /// Fetch a script_pubkey given the child number of a keychain. fn get_script_pubkey_from_path( &self, keychain: KeychainKind, child: u32, ) -> Result, Error>; - /// Fetch the script type and child number of a given script_pubkey + /// Fetch the keychain and child number of a given script_pubkey fn get_path_from_script_pubkey( &self, script: &Script, @@ -140,10 +140,10 @@ pub trait Database: BatchOperations { fn get_raw_tx(&self, txid: &Txid) -> Result, Error>; /// Fetch the transaction metadata and optionally also the raw transaction fn get_tx(&self, txid: &Txid, include_raw: bool) -> Result, Error>; - /// Return the last defivation index for a script type + /// Return the last defivation index for a keychain. fn get_last_index(&self, keychain: KeychainKind) -> Result, Error>; - /// Increment the last derivation index for a script type and returns it + /// Increment the last derivation index for a keychain and return it /// /// It should insert and return `0` if not present in the database fn increment_last_index(&mut self, keychain: KeychainKind) -> Result; diff --git a/src/wallet/tx_builder.rs b/src/wallet/tx_builder.rs index d2e67421..2ad9b761 100644 --- a/src/wallet/tx_builder.rs +++ b/src/wallet/tx_builder.rs @@ -163,7 +163,7 @@ impl, Ctx: TxBuilderContext> TxBuilde self } - /// Set the policy path to use while creating the transaction for a given script type + /// Set the policy path to use while creating the transaction for a given keychain. /// /// This method accepts a map where the key is the policy node id (see /// [`Policy::id`](crate::descriptor::Policy::id)) and the value is the list of the indexes of