Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom fallback algorithm for bnb #1581

Commits on Sep 10, 2024

  1. 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.
    evanlinjin authored and notmandatory committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    c18204d View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. test(coin_selection): add test for deterministic utxo selection

    Added back ignored branch and bounnd tests and cleaned up calculation for target amounts.
    notmandatory committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    65be4ea View commit details
    Browse the repository at this point in the history