53afb3511cb472c0fd91ccf2815fa0c44ffc56ba test(graph): Add additional witness scenarios (Wei Chen)
46af2a5ca4182a0b654c42e672f2a58bd39b5b96 feat(chain)!: Add ability to modify canonicalization algorithm (志宇)
58fcf3287be09d28a34243cf7aa02b8de1012148 refactor(chain): Make private fields in `CanonicalIter` concise. (志宇)
5eb5e86b5e456a571a7bd217fb7117f5acf8cf41 feat(chain): Signed txs should displace unsigned txs in `TxGraph`. (志宇)
Pull request description:
Partially Fixes bitcoindevkit/bdk_wallet#40
### Description
Add the ability to modify the canonicalization algorithm. Right now, the only modifier is `assume_canonical` which takes in a `Vec` (ordered list) of txids and superimposes it on the canonicalization algorithm. Txs later in the list (higher index) have a higher priority (in case of conflicts).
### Notes to the reviewers
None at the moment.
### Changelog notice
* Added `CanonicalizationParams` to allow the caller to modify the canonicalization algorithm. This in a new parameter on `CanonicalIter::new`.
* Changed `TxGraph::insert_tx` to allow for updating a transaction's witness field. This is useful for initially introducing an unsigned tx and adding witnesses later on.
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo fmt` and `cargo clippy` before committing
#### New Features:
* [x] I've added tests for the new feature
* [x] I've added docs for the new feature
#### Bugfixes:
* [x] This pull request breaks the existing API
* [x] I've added tests to reproduce the issue which are now passing
* [x] I'm linking the issue being fixed by this PR
ACKs for top commit:
LagginTimes:
ACK
53afb3511cb472c0fd91ccf2815fa0c44ffc56ba
ValuedMammal:
ACK
53afb3511cb472c0fd91ccf2815fa0c44ffc56ba
Tree-SHA512: 9fd070a3829d194f4d216c873922d9d47e047fa4b618628b875456f5cf4661d6b6c08a3a0dd4739b3a0f765e47c7c99acca53f195379e37f0f9cfed027bde17b