Repository navigation
test(chain): add test for gap placeholder eviction in merge_chains - #2414
ravindra-RKB wants to merge 1 commit into
Conversation
Add test verifying that a reorg across a chain gap does not emit None in the changeset for inferred placeholder heights that were never occupied checkpoints.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2414 +/- ##
=======================================
Coverage 80.66% 80.66%
=======================================
Files 31 31
Lines 6236 6236
Branches 293 293
=======================================
Hits 5030 5030
Misses 1136 1136
Partials 70 70
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:
|
|
Closing. This test is nonsense: it doesn't test what it claims, and the claim itself contradicts how The comment says height 1 is "only an inferred placeholder". That placeholder is the only reason this update applies: This reads like LLM output that nobody checked. #2348, #2410, #2412 and now this one: duplicated coverage, or descriptions of behaviour the code doesn't have. Every one of them cost maintainer time to take apart. Don't open PRs for code you haven't read and understood, and don't make claims you haven't verified yourself. Further PRs like these will be closed without review. |
Description
Adds a test case to
merge_chains_with_prev_blockhashincrates/chain/tests/test_local_chain.rs.When a chain has a gap where an intermediate block is inferred via
prev_blockhashas a placeholder (e.g. height 1 between genesis at height 0 and block B at height 2), an update introducing an alternative block at the gap height causes subsequent blocks in the chain to be invalidated.This test verifies that
merge_chainsinvalidates the occupied checkpoints above the reorg point ((2, None),(3, None)) while skipping uncommitted placeholders inpotentially_invalidated_heights, ensuring(1, None)is not emitted in the changeset.Checklists
All Submissions:
New Features / Tests: