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

Add process_and_select_coins function #727

Commits on Sep 23, 2022

  1. Add process_and_select_coins function

    There were some common tasks identified in the construction of a coin
    selection result that the different algorithms performed separately.
    Those tasks were blended inside the algorithms or separated into
    functions, but the underlying actions were the same:
    - Do some preprocessing to the inputs.
    - Select utxos based on the algorithm criterium.
    - Decide change.
    - Build the coin selection result.
    
    This commit intends to create a single function that consumes different
    algorithms and perform all the mentioned tasks as a pipeline taking
    utxos as input and producing coin selection results at the end.
    
    The new function reduces the work needed to implement other coin
    selection algorithms, modularizes the code not related directly to the
    selection process and reduces the number of lines to review and
    understand its logic.
    csralvall committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    20ad2a7 View commit details
    Browse the repository at this point in the history