[wallet] Use the branch-and-bound cs by default

Keep the `LargestFirst` coin selection for the tests, to make them more
predictable.
This commit is contained in:
Alekos Filini 2020-11-13 15:55:10 +01:00
parent ac18fb119f
commit a30ad49f63
No known key found for this signature in database
GPG Key ID: 5E8AFC3034FDFA4F

View File

@ -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)]