Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
761189a feat(chain): debug_assert non-wildcard desc. to only cache index 0 (志宇) 887e112 ref(chain): Refactor reveal_to_target (Daniela Brozzoni) 21d8875 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 761189a Tree-SHA512: 17f70bccbfa1cccf718ece0eeb61f4944c9108776cf1d606ef823ae9ff58bf52114750927ac99561644ece598f8131ee7f7605071d42c91e5e88e05035e74836
- Loading branch information