Ran
|
Files
39
|
Run time
1s
|
Badge
README BADGES
|
push
github
Merge bitcoindevkit/bdk#1261: Refactor `reveal_to_target` and `next_store_index` <a class=hub.com/bitcoindevkit/bdk/commit/761189ab2b679fbfee45b33435d66ed98a135e2a">761189ab2<a href="https://github.com/bitcoindevkit/bdk/commit/264bb85efc9cb6568ac89deee71c42f3617a9778"> feat(chain): debug_assert non-wildcard desc. to only cache index 0 (志宇) <a class="double-link" href="https://github.com/bitcoindevkit/bdk/commit/887e112e8f4ee5300bf09a0f3590861bff7fd053">887e112e8</a><a href="https://github.com/bitcoindevkit/bdk/commit/264bb85efc9cb6568ac89deee71c42f3617a9778"> ref(chain): Refactor reveal_to_target (Daniela Brozzoni) </a><a class="double-link" href="https://github.com/bitcoindevkit/bdk/commit/21d88758262bfbc3d9d2109aac9883f23ab651c4">21d887582</a> ref(chain): Refactor next_store_index (Daniela Brozzoni) Pull request description: ### Description As a part of #1203, I found myself having to modify `reveal_to_target`, but had some troubles understanding exactly what the method was doing. This PR refactors `reveal_to_target` to be, in my opinion, a bit clearer. We now exist prematurely if `next_reveal_index` < `target_index`; this way, we don't need to keep track of `next_reveal_index`, as it would always be equal to `Some(target_index)`. As a part of trying to understand `reveal_to_target` I had to read through `next_store_index`, I slightly improved it for clarity reasons as well. ### Changelog notice ### 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 ACKs for top commit: evanlinjin: ACK 761189ab2b679fbfee45b33435d66ed98a135e2a Tree-SHA512: 17f70bccb6cf1d606e644ece59835e74836
8882 of 11010 relevant lines covered (80.67%)
6023.25 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|