Commit 91d7d3c
committed
Merge #1658: fix(wallet)!: Improve test utilities
b0dc3dd feat(wallet)!: make `seen_at` mandatory for `Wallet::apply_update_at` (志宇)
00c568d revert(wallet)!: rm `Wallet::unbroadcast_transactions` (志宇)
200a16d fix(wallet)!: delete method `insert_tx` (valued mammal)
ab27884 test(wallet): improve usage of test utils (valued mammal)
9bdf4cb chore: fix imports (valued mammal)
28d8061 test(wallet): fix test descriptor getters (valued mammal)
3135e29 test(wallet): add helpers to `test_utils` (valued mammal)
823bb39 feat(wallet): add module `test_utils` (valued mammal)
297bd9a test(wallet): refactor helper `insert_anchor_from_conf` (valued mammal)
Pull request description:
Follow up to #1643, refactor `insert_anchor_from_conf` to just insert an anchor of type `ConfirmationBlockTime`
### Notes to the reviewers
The PR introduces a public `test_utils` module and "test-utils" cargo feature that exposes common helpers such as `get_funded_wallet`. Credit to #1492 for inspiring that idea. Usage of test utilities is enhanced overall, and tests are less dependent on problematic APIs that may be removed in the future.
### Changelog notice
- `bdk_wallet`: Added "test-utils" feature flag that exposes common helpers for testing and development
- Removed methods `Wallet::insert_tx`, `Wallet::insert_checkpoint`, `Wallet::unbroadcast_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
* [x] I've added docs for the new feature
* [x] This pull request breaks the existing API
Top commit has no ACKs.
Tree-SHA512: 561757595c65b4531dbf8b81f44387af6ac60114ecca493693cd975188741b5ff7b75a0dcf1dafc9d5750566baad81c644e7463c3c412a8331ad73de29601016File tree
7 files changed
+402
-521
lines changed- crates/wallet
- src
- wallet
- tests
7 files changed
+402
-521
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
0 commit comments