From: Steve Myers Date: Tue, 12 Nov 2024 04:36:59 +0000 (-0600) Subject: Merge bitcoindevkit/bdk#1658: fix(wallet)!: Improve test utilities X-Git-Tag: v1.0.0-beta.6~22 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/-sqlite-db-configuration/static/struct.CommandStringError.html?a=commitdiff_plain;h=91d7d3c20e525806bc3ee43ad5256c8b4ff9124c;p=bdk Merge bitcoindevkit/bdk#1658: fix(wallet)!: Improve test utilities b0dc3ddd3a5f2ff8e5b2fc5654fc2519bc7e728e feat(wallet)!: make `seen_at` mandatory for `Wallet::apply_update_at` (志宇) 00c568d4c5e020439c7f586075d3aa2003cd4b10 revert(wallet)!: rm `Wallet::unbroadcast_transactions` (志宇) 200a16d277f7711a586f46833ab1b2ebf96b73c9 fix(wallet)!: delete method `insert_tx` (valued mammal) ab278844a9fa2ebaac7da97b23d6a88e5237ab16 test(wallet): improve usage of test utils (valued mammal) 9bdf4cb9829021a868a5e955f5297e632edf5d86 chore: fix imports (valued mammal) 28d806123f4aa1b40ff1eb2a3148e25eb4104d8e test(wallet): fix test descriptor getters (valued mammal) 3135e291d777d474ab4b76de36d43a96ff104a3c test(wallet): add helpers to `test_utils` (valued mammal) 823bb39fc1682b42b0e4a33d6a9030f82668656a feat(wallet): add module `test_utils` (valued mammal) 297bd9a5123f3c901e11eadf33a51351c1e2f6a4 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: 561757595c65b4531dbf8b81f44387af6ac60114ecca493693cd975188741b5ff7b75a0dcf1dafc9d5750566baad81c644e7463c3c412a8331ad73de29601016 --- 91d7d3c20e525806bc3ee43ad5256c8b4ff9124c