From: Alekos Filini Date: Fri, 13 Nov 2020 14:55:10 +0000 (+0100) Subject: [wallet] Use the branch-and-bound cs by default X-Git-Tag: v0.2.0~70 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/enum.ClassifyContext.html?a=commitdiff_plain;h=a30ad49f63410580fea27874f824da719f6232d9;p=bdk [wallet] Use the branch-and-bound cs by default Keep the `LargestFirst` coin selection for the tests, to make them more predictable. --- diff --git a/src/wallet/coin_selection.rs b/src/wallet/coin_selection.rs index c5262482..ba67ef56 100644 --- a/src/wallet/coin_selection.rs +++ b/src/wallet/coin_selection.rs @@ -119,7 +119,10 @@ use rand::{rngs::StdRng, SeedableRng}; /// Default coin selection algorithm used by [`TxBuilder`](super::tx_builder::TxBuilder) if not /// overridden -pub type DefaultCoinSelectionAlgorithm = LargestFirstCoinSelection; +#[cfg(not(test))] +pub type DefaultCoinSelectionAlgorithm = BranchAndBoundCoinSelection; +#[cfg(test)] +pub type DefaultCoinSelectionAlgorithm = LargestFirstCoinSelection; // make the tests more predictable /// Result of a successful coin selection #[derive(Debug)]