]> Untitled Git - bdk/commit
ref(chain): Refactor reveal_to_target
authorDaniela Brozzoni <danielabrozzoni@protonmail.com>
Mon, 8 Jan 2024 13:47:28 +0000 (14:47 +0100)
committerDaniela Brozzoni <danielabrozzoni@protonmail.com>
Tue, 9 Jan 2024 13:13:43 +0000 (14:13 +0100)
commit887e112e8f4ee5300bf09a0f3590861bff7fd053
tree32e33b5f441b1bf279559c84f8882fa7cca49d60
parent21d88758262bfbc3d9d2109aac9883f23ab651c4
ref(chain): Refactor reveal_to_target

Simplify the `reveal_to_target` algorithm by exiting prematurely if
the `target_index` is already revealed.
Since the `reveal_to_index` variable was different from
`Some(target_index)` only if the target was already revealed, we can
getrid of the variable altogether.
crates/chain/src/keychain/txout_index.rs