Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #1779:
transactions
method should only return relevant transa…
…ctions 75fae3e test(wallet): verify Wallet::transactions method only returns relevant txs (Steve Myers) 3e1fd2b fix(wallet): `transactions` method should only return relevant txs (志宇) Pull request description: Fixes #1239 ### Description Currently the behavior of `Wallet::transactions` is not well defined and unintuitive. The approach taken in this PR is to make `Wallet::transactions` return what most wallets would like the caller to see (i.e. transactions that are part of the canonical history and spend from/to a tracked spk). A.k.a make the method more restrictive. Documentation is updated to refer the caller to the underlying `bdk_chain` structures for any over usecase. After #1765 gets merged, the behavior of `Wallet::transactions` will become even more unintuitive. Refer to #1765 (review). ### Notes to the reviewers **Why not have multiple methods in `Wallet` that return different sets of transactions?** I think it's better to only provide common usecase histories from `Wallet` and I can only think of one. ### Changelog notice * Change `Wallet::transactions` to only include "relevant" transactions. ### 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 ACKs for top commit: luisschwab: tACK 75fae3e notmandatory: tACK 75fae3e oleonardolima: tACK 75fae3e ValuedMammal: ACK 75fae3e Tree-SHA512: abf159e0c5d44842d7e0fc5ebc6829d34646fbc45d07bb145ce327f368db0e571ab7c5731a12e63258dfc74abb9d4ff1b841842de8341e0f21b5cbb2becc5e5f
- Loading branch information