|
Ran
|
Jobs
1
|
Files
39
|
Run time
18s
|
Badge
README BADGES
|
push
github
Merge bitcoindevkit/bdk#1028: Add CreateTxError and use as error type for TxBuilder::finish() 00ec19ef2 ci: fix MSRV pinning for rustls 0.21.9 (Steve Myers) 77f9977c0 feat(wallet): Add infallible Wallet get_address(), get_internal_address functions (Steve Myers) 9e7d99e3b refactor(bdk)!: add context specific error types, remove top level error mod (Steve Myers) Pull request description: ### Description To remove some places where there were `.expect("TODO")` I added a new `CreateTxError` type which is returned from `TxBuilder::finish()`. I also updated related tests and doc tests. Fixes https://github.com/bitcoindevkit/bdk/issues/996#issuecomment-1621036206 Also added fallible `Wallet::try_get_address()` and `try_get_internal_address()` to return `Result` with a possible `D:WriteError` when a PersistBackend is used. This should fix #996. I removed catch-all bdk::Error and replaced usages with new types and updated related functions, fixes #994. ### Notes to the reviewers ~~I didn't add all possible bdk::Error types that `Wallet::create_tx()` and `TxBuilder::finish()` functions might throw. It's probably not too much more work but will take a bit more research so I want to make sure this is the right general approach first.~~ I added `anyhow` to the dev-dependencies so I could remove some `.expect()` lines from the docs tests and make the examples closer to what an end user should do. I also used the `anyhow!()` macro to replace a few places that were using the `bdk::Error::Generic` in example code. I also moved the module level error.rs file to wallet/error.rs so no one would be tempted to make any new catch all errors and to make it clear that all the errors in it are wallet module related. ### Changelog notice Changed - Updated bdk module to use new context specific error types - wallet: MiniscriptPsbtError, Create... (continued)
99 of 288 new or added lines in 8 files covered. (34.38%)
1 existing line in 1 file now uncovered.8799 of 10950 relevant lines covered (80.36%)
5742.35 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 6895070020.1 | 0 |
80.36 |
GitHub Action Run |