Test: pin locks_out_branch_of boundary cases (PR #320 follow-up)#346
Merged
Conversation
PR #320 added block_handle::locks_out_branch_of but left two input classes unpinned by tests: - qc.block_num == head.last_final_block_num: the helper uses a strict `<`, so this boundary must be caught by head.extends(qc_target). Add a case where head's lib is exactly the shared ancestor and the QC targets that same block, asserting the not-locked-out result comes from the extends() path, not the `<` guard. - genesis core (no real QC): pin the !qc.is_strong_qc early return. Also document get_block_reference's precondition at the call site (strong qc implies non-genesis core, so block_num is in range) and drop trailing whitespace after the helper.
brianjohnson5972
approved these changes
May 20, 2026
heifner
added a commit
that referenced
this pull request
May 20, 2026
…locks-at-slot-entry Brings origin/master up to 3806434, picking up #292 (msig chunked storage), #318 (host builtin intrinsic removal), and #346 (locks_out_branch_of genesis-core and last_final boundary cases). Conflict in unittests/fork_db_tests.cpp resolved by keeping our h14a/h14b extensions to locks_out_branch_of_test alongside master's h_root genesis case. block_handle.hpp deduplicated -- both sides had appended extends() in different positions; kept the one with the tightened comment.
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.
Follow-up to #320. Adds the test coverage and doc cleanup that should have gone in with the original change to block_handle::locks_out_branch_of.
<, so the equality case relies on head.extends(qc_target) instead. Pinned in locks_out_branch_of_lib_advanced_past_shared_ancestor with a head whose lib is exactly the shared ancestor.No production behavior change; producer_plugin's now-unconditional fork_db_head() call in producing mode was reviewed and is required for the lockout check (already gated by in_producing_mode(); cost is negligible).