Remove some unused code from validation.
validation: remove unused code #36103
pull fanquake wants to merge 5 commits into bitcoin:master from fanquake:validation_dead_code changing 2 files +21 −36-
fanquake commented at 3:02 PM on August 27, 2026: member
-
validation: remove unused PackageMempoolAcceptResult constructor 2cb6c156e1
-
validation: remove unused total_vsize arg from PackageRBFChecks d26dc09ee3
-
validation: remove unused args from ConsensusScriptChecks a9d5cf7f99
-
validation: remove unused args from PolicyScriptChecks 84c5290149
- DrahtBot added the label Validation on Aug 27, 2026
-
DrahtBot commented at 3:02 PM on August 27, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/36103.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline and AI policy for information on the review process.
Type Reviewers ACK thomasbuilds, sedited, yuvicc, hebasto, jeanpablojp If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #35557 (kernel, validation: Add btck_chainstate_manager_set_clock_time by ryanofsky)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
- sedited approved
-
sedited commented at 3:55 PM on August 27, 2026: contributor
ACK 84c5290149a3f6d62ecebeaa064852b22db1a9f4
-
validation: remove unused m_chainparams from ATMPArgs 15630c7b85
-
in src/validation.cpp:458 in 84c5290149
thomasbuilds commented at 4:15 PM on August 27, 2026:m_chainparams appears unused too
thomasbuilds commented at 4:52 PM on August 27, 2026:update:
m_chainparamshas been unread since 78adef1 which switchedGetBlockScriptFlagsfrom takingConsensus::ParamstoChainstateManagerand deleted the field's last read. The same commit is what orphaned theargsparam this PR removes fromConsensusScriptChecks.
fanquake commented at 5:06 PM on August 27, 2026:Thanks, I think you're correct here. Pushed up another commit.
thomasbuilds commented at 5:15 PM on August 27, 2026: contributorACK 15630c7
DrahtBot requested review from sedited on Aug 27, 2026sedited approvedsedited commented at 5:36 PM on August 27, 2026: contributorACK 15630c7b852c20624fe0f5dbc46db4e869dfd331
yuvicc commented at 3:57 AM on August 28, 2026: contributorACK 15630c7b852c20624fe0f5dbc46db4e869dfd331
No behavior change and removal looks good.
hebasto approvedhebasto commented at 7:24 AM on August 28, 2026: memberACK 15630c7b852c20624fe0f5dbc46db4e869dfd331, completeness of removing unused parameters in the
validationmodule verified by overriding the-Wunused-parametercompiler flag forsrc/validation.cpp.jeanpablojp commented at 2:12 AM on August 30, 2026: contributortACK 15630c7b852c20624fe0f5dbc46db4e869dfd331
Built and ran the unit tests.
Chainstate::SetTargetBlockHashhas no caller either, and-Wunused-parameterdoesn't catch it because it's a method, not a parameter. It landed in master already unused, in #30214, which open-coded its last call site inAddChainstate. But if you'd rather not touch this PR any further, I can open a follow-up.sedited merged this on Aug 31, 2026sedited closed this on Aug 31, 2026fanquake deleted the branch on Aug 31, 2026Labels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-08-31 18:51 UTC
More mirrored repositories can be found on mirror.b10c.me