feat(core)!: Make last_active_indices a Vec<(K, u32)> - #2315
Draft
evanlinjin wants to merge 1 commit into
Draft
evanlinjin wants to merge 1 commit into
evanlinjin wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2315 +/- ##
==========================================
+ Coverage 78.84% 78.85% +0.01%
==========================================
Files 31 31
Lines 6060 6063 +3
Branches 288 288
==========================================
+ Hits 4778 4781 +3
Misses 1203 1203
Partials 79 79
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
evanlinjin
force-pushed
the
feat/last-active-indices-vec
branch
from
September 16, 2026 06:57
d232bfb to
995ee2e
Compare
`FullScanResponse::last_active_indices` was a `BTreeMap<K, u32>`, which forced every producer to keep a running per-keychain max before reporting, since a chain source learns of activity one spk at a time in arbitrary order. Producers now push each observation as they make it, and merging two responses is a concatenation. `KeychainTxOutIndex::reveal_to_target_multi` now takes `impl IntoIterator<Item = (K, u32)>`. It only ever reveals upwards, so unordered and repeated entries are already handled correctly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VATvTCqPsmqxZuvzm7WZ9s
evanlinjin
force-pushed
the
feat/last-active-indices-vec
branch
from
September 16, 2026 07:00
995ee2e to
3a6795e
Compare
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.
Description
Fixes #2314.
FullScanResponse::last_active_indicesis now aVec<(K, u32)>instead of aBTreeMap<K, u32>, andKeychainTxOutIndex::reveal_to_target_multitakesimpl IntoIterator<Item = (K, u32)>instead of&BTreeMap<K, u32>.A chain source learns of activity one spk at a time, in arbitrary order, so a
map forces every producer to keep a running per-keychain max before it can
report (a plain
insertthere silently under-reports the last active index).The consumer never needed a map:
_reveal_to_targetonly reveals upwards, sounordered and repeated entries are already handled correctly. Merging two
responses is now a concatenation instead of a per-key max.
Notes to the reviewers
The esplora and electrum producers now push each observation as they make it.
Both still emit at most one entry per keychain, so the tests assert on the exact
Vec.Changelog notice
FullScanResponse::last_active_indicesis nowVec<(K, u32)>.KeychainTxOutIndex::reveal_to_target_multinow takesimpl IntoIterator<Item = (K, u32)>.Checklists
All Submissions:
Bugfixes:
🤖 Generated with Claude Code
https://claude.ai/code/session_01VATvTCqPsmqxZuvzm7WZ9s