]> Untitled Git - bdk/commit
refactor(chain)!: remove `inner` method from KeychainTxOutIndex
authorvalued mammal <valuedmammal@protonmail.com>
Wed, 16 Oct 2024 16:52:03 +0000 (12:52 -0400)
committervalued mammal <valuedmammal@protonmail.com>
Fri, 18 Oct 2024 15:37:22 +0000 (11:37 -0400)
commit8494c12ed49856b069375bdb036e6036c77f9019
tree796cac90f90ffe921bc15e198fe2f8869f4b3a55
parent7969898c732a3a387a932a61b1719cedcb6fae3c
refactor(chain)!: remove `inner` method from KeychainTxOutIndex

It's desirable to have the inner SPK index internal to the
`keychain_txout` module, which aims to provide views into
the set of revealed SPKs for a given keychain.

The inner index also functions as a cache of unrevealed SPKs,
i.e. the lookahead. We test the functionality of the lookahead
by checking the value returned from
`KeychainTxOutIndex::spk_at_index` matches the SPK derived by
the descriptor at that index for indices ranging from the
last revealed to the expected last stored.
crates/chain/src/indexer/keychain_txout.rs
crates/chain/tests/test_keychain_txout_index.rs