|
Ran
|
Jobs
1
|
Files
23
|
Run time
1min
|
Badge
README BADGES
|
push
github
Merge bitcoindevkit/bdk-sp#70: fix: accept tsp recipients on Signet and Testnet4 bca79c5fa fix(cli): accept tsp recipients on Signet and Testnet4 (kkdao) b2dc8346f feat(encoding): add SilentPaymentCode::is_valid_for_network (kkdao) Pull request description: ### Description Fixes #68 Every test network encodes to the same `tsp` prefix, so parsing always returns `Network::Testnet`. `sp-cli2 new-tx --to-sp` compared that to the wallet's network with `!=`, so Signet and Testnet4 wallets rejected valid codes, including their own. Adds `SilentPaymentCode::is_valid_for_network`, which compares prefixes instead, and uses it in `sp-cli2`. The empty `bail!("")` next to it gets a message. ### Notes to the reviewers Encoding is unchanged — this only changes how compatibility is judged. `prefix_assignment_is_unchanged` pins that. The prefix match already in `Display::fmt` is lifted into `hrp_for_network` and shared, so the two can't drift. Groups follow this crate's encoder, not `bitcoin::NetworkKind`, which groups regtest with the other test networks while this crate gives regtest its own `sprt`. Tests are in `silentpayments` rather than next to the CLI because `cli/v2` isn't in `default-members` and `just check`/`just test` exclude it, so a test there would never run. I built and linted `cli/v2` directly to check this change. ### Changelog notice Added: `SilentPaymentCode::is_valid_for_network` and `encoding::hrp_for_network`. Fixed: `sp-cli2 new-tx --to-sp` rejected valid `tsp` recipients on Signet and Testnet4. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [conventional commit guidelines](https://www.conventionalcommits.org/en/v1.0.0/) * [x] I ran `just p` (fmt, clippy and test) before committing #### New Features: * [x] I've added tests for the new feature * [x] I've added docs for the new featur... (continued)
74 of 94 branches covered (78.72%)
Branch coverage included in aggregate %.
25 of 28 new or added lines in 2 files covered. (89.29%)
840 of 3300 relevant lines covered (25.45%)
10.5 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 3 |
0.0 |
0.0% | cli/v2/src/main.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 33507320938.1 | 23 |
26.93 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|