diff --git a/src/database/mod.rs b/src/database/mod.rs index 27d6e4dbf..134cb6b77 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -214,6 +214,7 @@ pub(crate) trait DatabaseUtils: Database { impl DatabaseUtils for T {} #[cfg(test)] +#[allow(missing_docs)] pub mod test { use bitcoin::consensus::encode::deserialize; use bitcoin::consensus::serialize; diff --git a/src/keys/mod.rs b/src/keys/mod.rs index 140f7dfdc..ac7ff57aa 100644 --- a/src/keys/mod.rs +++ b/src/keys/mod.rs @@ -949,7 +949,7 @@ impl std::fmt::Display for KeyError { impl std::error::Error for KeyError {} #[cfg(test)] -pub mod test { +mod test { use bitcoin::bip32; use super::*; diff --git a/src/wallet/coin_selection.rs b/src/wallet/coin_selection.rs index e85e24443..0d35f7e10 100644 --- a/src/wallet/coin_selection.rs +++ b/src/wallet/coin_selection.rs @@ -119,8 +119,11 @@ use std::convert::TryInto; /// overridden #[cfg(not(test))] pub type DefaultCoinSelectionAlgorithm = BranchAndBoundCoinSelection; + +/// Default deterministic coin selection algorithm for testing used by [`TxBuilder`](super::tx_builder::TxBuilder) if not +/// overridden #[cfg(test)] -pub type DefaultCoinSelectionAlgorithm = LargestFirstCoinSelection; // make the tests more predictable +pub type DefaultCoinSelectionAlgorithm = LargestFirstCoinSelection; // Base weight of a Txin, not counting the weight needed for satisfying it. // prev_txid (32 bytes) + prev_vout (4 bytes) + sequence (4 bytes)