/// can be derived from the policy.
///
/// This example demonstrates the interaction between a bdk wallet and miniscript policy.
-
fn main() -> Result<(), Box<dyn Error>> {
env_logger::init_from_env(
env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"),
impl<T: Database> DatabaseUtils for T {}
#[cfg(test)]
+#[allow(missing_docs)]
pub mod test {
use bitcoin::consensus::encode::deserialize;
use bitcoin::consensus::serialize;
impl std::error::Error for KeyError {}
#[cfg(test)]
-pub mod test {
+mod test {
use bitcoin::bip32;
use super::*;
/// 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)