loop
loop copied to clipboard
sweepbatcher: add greedy batch selection algorithm
trafficstars
If custom fee rates are used, the algorithm is tried. It selects a batch for the sweep using the greedy algorithm, which minimizes costs, and adds the sweep to the batch. If it fails, old algorithm is used, trying to add to any batch, or starting a new batch.
The PR also includes some refactorings and fixes small inaccuracies in fee estimations.
Pull Request Checklist
- [ ] Update
release_notes.mdif your PR contains major features, breaking changes or bugfixes