Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information