refactor(chain)!: remove inner method from KeychainTxOutIndex#1652
Merged
notmandatory merged 1 commit intobitcoindevkit:masterfrom Oct 30, 2024
Merged
Conversation
445f2f2 to
936bba9
Compare
Comment on lines
+174
to
+175
| txout_index.spk_at_index(TestKeychain::External, i), | ||
| Some(spk_at_index(&external_descriptor, i)) |
Collaborator
There was a problem hiding this comment.
I still might need another pass to fully grasp the tests, but shouldn't this be asserting for the TestKeychain::Internal?
Collaborator
Author
There was a problem hiding this comment.
Thank you, fixed
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.
936bba9 to
8494c12
Compare
Member
|
BTW, thanks for naming the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1353 by removing the
innermethod fromkeychain_txoutmodule. See commit message for details.Changelog notice
bdk_chain: Removed methodKeychainTxOutIndex::innerChecklists
All Submissions:
cargo fmtandcargo clippybefore committing