Ran
|
Jobs
1
|
Files
40
|
Run time
1min
|
Badge
Embed ▾
README BADGES
|
push
github
Merge bitcoindevkit/bdk#1387: fix(wallet): remove the generic from wallet <a class=hub.com/bitcoindevkit/bdk/commit/e51af49ffa951e14203ac2b465ade351dd90f6cd">e51af49ff fix(wallet): remove generic from wallet (Rob N) Pull request description: ### Description The `PersistenceBackend` uses generics to describe errors returned while applying the change set to the persistence layer. This change removes generics wherever possible and introduces a new public error enum. Removing the generics from `PersistenceBackend` errors is the first step towards #1363 *Update*: I proceeded with removing the generics from `Wallet` by introducing a `Box<dyn PersistenceBackend>` . ### Notes to the reviewers This one sort of blew up in the number of changes due to the use of generics for most of the `Wallet` error variants. The generics were only used for the persistence errors, so I removed the generics from higher level errors whenever possible. The error variants of `PersistenceBackend` may also be more expressive, but I will level that up for discussion and make any changes required. ### Changelog notice - Changed `PersistenceBackend` errors to depend on the `anyhow` crate. - Remove the generic `T` from `Wallet` ### 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: * [ ] 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 * [ ] 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: evanlinjin: ACK e51af49ffa951e14203ac2b465ade351dd90f6cd Tree-SHA512: 8ce4f1c49eda6800450d75001c4181117ff
45 of 69 new or added lines in 6 files covered. (65.22%)
3 existing lines in 1 file now uncovered.9597 of 11338 relevant lines covered (84.64%)
18101.23 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
13.73 |
0.0% | crates/bdk/src/wallet/error.rs |
1 |
96.21 |
0.03% | crates/file_store/src/store.rs |
5 |
69.44 |
-7.97% | crates/chain/src/persist.rs |
17 |
82.9 |
0.32% | crates/bdk/src/wallet/mod.rs |
Lines | Coverage | ∆ | File |
---|---|---|---|
3 |
82.9 |
0.32% | crates/bdk/src/wallet/mod.rs |
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 8763309911.1 | 40 |
84.64 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|