Repository navigation
Conversation
Closed
optout21
force-pushed
the
connectblock-checkonly
branch
2 times, most recently
from
August 24, 2026 07:00
f473d26 to
0e832db
Compare
optout21
force-pushed
the
connectblock-checkonly
branch
3 times, most recently
from
September 11, 2026 08:22
ddc6be9 to
fe970b7
Compare
New `TestConnectBlock` method for the check-only variant of `ConnectBlock`, with const `CBlockIndex` parameter. The `fJustCheck` flag is no longer present in the public method versions. It is still present in the non-pubic common implementation method, but with reduced usage.
optout21
force-pushed
the
connectblock-checkonly
branch
from
September 26, 2026 04:50
fe970b7 to
f478dc0
Compare
Owner
Author
|
--> bitcoin#36066 |
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.
This is a small code-hygiene change to
ConnectBlockmethod.Problem: In the "check-only" mode of
ConnectBlockthe mutability of theCBlockIndexparameter is inconsistent with the semantics. In the default operation,ConnectBlockchanges the providedCBlockIndex. However, it has a special "check-only" mode, where the provided chain is not changed. This mode is used from only one call site (TestBlockValidity), and is signaled by thefJustCheck = trueflag.Solution: Provide two versions of
ConnectBlock: one with mutable chain and one "check-only" with const chain. There is no need for thefJustCheckflag. Both reuse the same internal implementation.Additional info:
CBlockIndexunnecessary