Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2345 +/- ##
==========================================
+ Coverage 78.84% 78.87% +0.03%
==========================================
Files 31 31
Lines 6060 6060
Branches 288 288
==========================================
+ Hits 4778 4780 +2
+ Misses 1203 1202 -1
+ Partials 79 78 -1
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:
|
With Anchor::confirmation_height_upper_bound removed in bitcoindevkit#2299, the original fix for bitcoindevkit#2344 is no longer needed. Use ConfirmationBlockTime to cover the supported exact-block semantics instead. Check height-index uniqueness and changeset reconstruction after out-of-order, same-height fork, and duplicate anchor insertions. Also check that leftover canonicalization uses the highest anchor block height rather than confirmation timestamps or insertion order. Signed-off-by: kleonyuan <kleonyuan@outlook.com>
1 of 3 tasks
1 task done
Member
|
Closing in favor of #2390. The ordering bug this fixed was already resolved by #2299, so the code change is no longer in this PR's diff after the rebase, though the title and changelog still describe it. #2390 keeps a smaller regression test for it. Thanks for the work on this, @kleonyuan. |
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 #2344
TxGraph::insert_anchor()used the last anchor in theBTreeSetto determine the previous maximum confirmation height. SinceAnchor::Ordprioritizes the anchorBlockIdand does not order anchors byconfirmation_height_upper_bound(), this could leave stale or duplicate entries in the highest confirmation height index.CanonicalTask made the same ordering assumption when assigning a height to transactions whose anchors are not confirmed.
Compute the maximum confirmation height across all anchors in both places. Add regression coverage using a custom
Anchorwhose confirmation height upper bounds are not monotonic with its block heights.Notes to the reviewers
The regression cases use anchors at block heights 100, 90, and 110 with confirmation upper bounds 10, 80, and 20, respectively.
Changelog notice
Fix highest confirmation height indexing and leftover transaction heights for custom anchors.
Checklists
All Submissions:
Bugfixes: