|
Ran
|
Jobs
1
|
Files
130
|
Run time
1min
|
Badge
README BADGES
|
push
github
Merge rust-bitcoin/rust-bitcoin#4623: Improve `Xpriv::derive_xpriv` and `Xpub::derive_xpub` ergonomics slightly <a class=hub.com/rust-bitcoin/rust-bitcoin/commit/<a class="double-link" href="https://git"><a class=hub.com/rust-bitcoin/rust-bitcoin/commit/352712257e66c7959b80a9f6375961295a292306">352712257<a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/d84745fd924ddc0cb4548924db482e25630e30df"> psbt: Use new `derive_xpriv` flexibility in GetKey (Daniel Roberts) <a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/bd3f4b6bf12b2832cfb3bb11bc0a0e52e1057fe7">bd3f4b6bf</a><a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/d84745fd924ddc0cb4548924db482e25630e30df"> psbt: Add test for GetKey bip32 (Daniel Roberts) </a><a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/c7bdec14fbf79097c4d73051cc0d594cf9b61e8b">c7bdec14f</a><a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/d84745fd924ddc0cb4548924db482e25630e30df"> Fix clippy lint and formatting for `Xpriv::derive_xpriv` and `Xpriv::derive_xpub` calls (Daniel Roberts) </a><a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/9d4381c8fe636d2d1d63b394b246e939f1192de7">9d4381c8f</a> Improve `Xpriv::derive_xpriv` and `Xpub::derive_xpub` ergonomics (Daniel Roberts) Pull request description: This enables a couple more things to be passed to the bip32 derive methods, with (afaict) no downside (all existing call sites remain valid and work as before). Given ``` let secp = Secp256k1::new(); let path: DerivationPath = "42'/350'/0".parse().unwrap(); let xpriv: Xpriv = "xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi".parse().unwrap(); ``` The following *new* ways to call derive are enabled: ``` /// Derive using only part of the path xpriv.derive_xpriv(&secp, &path[1..]) ``` ``` /// Derive moving into the method xpriv.derive_xpriv(&secp, path) ``` The second case is probably of questionable usefulness, but I've ended up writing something like ``` let path: DerivationPath = path.into_iter().skip(n).cloned().collect() ``` enough that the first case would be welcome, and can be done with a minimal change. I'm reasonably confident this doesn't break anything (and it indeed doesn't break any tests that I can see) but this is definitely on the edge of my comfort with the rust type system, which is why I've created this as a draft. ACKs for top commit: tcharding: ACK 352712257e66c7959b80a9f6375961295a292306 apoelstra: ACK 352712257e66c7959b80a9f6375961295a292306; successfully ran local tests; nice! Tree-SHA512: ... (continued)
22 of 25 new or added lines in 2 files covered. (88.0%)
23556 of 27966 relevant lines covered (84.23%)
15877.57 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 2 |
86.58 |
0.11% | bitcoin/src/bip32.rs |
| 1 |
87.22 |
1.14% | bitcoin/src/psbt/mod.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 15850676732.1 | 130 |
84.23 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|