bdk
bdk copied to clipboard
Add support for custom sorting and deprecate BIP69
Description
Resolves #534.
This PR adds a way to add custom sorting functions for both inputs and outputs. BIP69 is permanently deprecated.
Notes to the reviewers
Fn was used instead of FnMut to reduce complexity, since it's inside an Arc. We can try supporting FnMut but that would also require us to use a Mutex and I'm not sure whether it's worth the added complexity.
Additionally, I cannot decide what kind of test will be good for this. Should I implement just a simple sort (like a.value.cmp(&b.value)) and test if it's in proper order?
All Submissions:
- [x] I've signed all my commits
- [x] I followed the contribution guidelines
- [x] I ran
cargo fmtandcargo clippybefore committing
New Features:
- [ ] I've added tests for the new feature
- [x] I've added docs for the new feature
- [x] I've updated
CHANGELOG.md
Bugfixes:
- [ ] This pull request breaks the existing API
- [ ] I've added tests to reproduce the issue which are now passing
- [x] I'm linking the issue being fixed by this PR
But I don't recall if we have decided to depreciate BIP69
Yes, the idea is to deprecate it, but never remove it. It's just to make the users aware of its issues, they will be shown a warning and they can decide if they want to keep using it or not.
Hi, please rebase to pickup changes in #596. Thanks!
Hey @Yureien, are you still working on this?
I'm closing this PR as the author hasn't been working on it for a while. If that's not the case, and instead you wish to keep working on this, feel free to re-open it :)