Skip to content

[draft] Refactor some validation.cpp methods to return BlockValidationState#7

Draft
optout21 wants to merge 5 commits into
masterfrom
2605-validation-state-return
Draft

[draft] Refactor some validation.cpp methods to return BlockValidationState#7
optout21 wants to merge 5 commits into
masterfrom
2605-validation-state-return

Conversation

@optout21
Copy link
Copy Markdown
Owner

@optout21 optout21 commented May 2, 2026

Continuation of # 33856

@optout21 optout21 force-pushed the 2605-validation-state-return branch 2 times, most recently from d78b817 to 44d3197 Compare May 2, 2026 12:48
@optout21 optout21 force-pushed the 2605-validation-state-return branch 5 times, most recently from a52e467 to fd9b639 Compare May 19, 2026 13:12
@optout21
Copy link
Copy Markdown
Owner Author

Note: bitcoin#33856 has been merged

@optout21 optout21 force-pushed the 2605-validation-state-return branch from fd9b639 to aa67944 Compare May 20, 2026 08:37
optout21 and others added 5 commits May 20, 2026 10:39
Return BlockValidationState by value instead of using an out-parameter,
similar to the TestBlockValidity refactoring in 74690f4.

Remove redundant int return from btck_chainstate_manager_process_block_header.
Previously returned both an int result and an output validation state parameter, creating ambiguity
where non-zero could mean either invalid header or processing failure. Since ProcessNewBlockHeaders already provides complete validation info, the int return was redundant.

Co-authored-by: stringintech <stringintech@gmail.com>
Co-authored-by: stickies-v <stickies-v@protonmail.com>
@optout21 optout21 force-pushed the 2605-validation-state-return branch from aa67944 to 771a265 Compare May 20, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants