Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(wallet)!: allow custom fallback algorithm for bnb
Signature of `CoinSelectionAlgorithm::coin_select` has been changed to take in a `&mut RangCore`. This allows us to pass the random number generator directly to the cs algorithm. Single random draw is now it's own type `SingleRandomDraw` and impls `CoinSelectionAlgorithm`. `BranchAndBoundCoinSelection` now handles it's own fallback algorithm internally, and a generic type parameter is added to specify the fallback algorithm. `coin_selection::Error` is renamed to `InsufficientFunds` and the BnB error variants are removed. The BnB error variants are no longer needed since those cases are handled internally by `BranchAndBoundCoinSelection` (via calling the fallback algorithm). Add test_bnb_fallback_algorithm test and docs cleanup suggested by @ValuedMammal.
- Loading branch information