Skip to content

Commit f2ec3e2

Browse files
committed
docs: Improve BnB section wording
1 parent 28e564f commit f2ec3e2

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/branch_and_bound.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,12 @@ use bitcoin::{Amount, FeeRate, SignedAmount};
99

1010
use crate::WeightedUtxo;
1111

12-
/// Select coins bnb performs a depth first branch and bound search. The search traverses a
13-
/// binary tree with a maximum depth n where n is the size of the target UTXO pool.
12+
/// Performs a deterministic depth first branch and bound search for a changeless solution.
1413
///
15-
/// See also core: <https://github.com/bitcoin/bitcoin/blob/f3bc1a72825fe2b51f4bc20e004cef464f05b965/src/wallet/coinselection.cpp>
16-
///
17-
/// Returns a type that implements IntoIter that meet or exceeds the target `Amount` when collected
18-
/// and summed. The `Amount` returned will not exceed the target by more than target + delta where
19-
/// delta is the cost of producing a change output.
20-
///
21-
/// The results seek to minimize the excess, which is the difference between the target
22-
/// `Amount` and sum of the results. If no match can be found, None is returned.
14+
/// A changeless solution is one that exceeds the target amount and is less than target amount plus
15+
/// cost of creating change. In other words, a changeless solution is a solution where it is less expensive
16+
/// to discard the excess amount (amount over the target) than it is to create a new output
17+
/// containing the change.
2318
///
2419
/// This algorithm is designed to never panic or overflow. If a panic or overflow would occur,
2520
/// None is returned. Also, if no match can be found, None is returned. The semantics may

0 commit comments

Comments
 (0)