In builds where G_ABORT_ON_FAILED_ASSUME is true, inline_check_non_fatal called assertion_fail() and then had a throw NonFatalCheckError that was never reachable, because assertion_fail() either aborts or throws and never returns.
Refactored inline_check_non_fatal to use if constexpr (G_ABORT_ON_FAILED_ASSUME) { assertion_fail(...) } else { throw NonFatalCheckError(...) } branch, removing the unreachable throw
refactor: avoid unreachable throw in `inline_check_non_fatal` #34426
pull lisenokdonbassenok wants to merge 1 commits into bitcoin:master from lisenokdonbassenok:refactor/util-inline-check-non-fatal changing 1 files +2 −1-
lisenokdonbassenok commented at 6:49 AM on January 28, 2026: none
-
refactor: avoid unreachable throw in `inline_check_non_fatal` e8e714db33
- DrahtBot added the label Refactoring on Jan 28, 2026
-
DrahtBot commented at 6:49 AM on January 28, 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/34426.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process. A summary of reviews will appear here.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
maflcko commented at 6:55 AM on January 28, 2026: member
Thank you for your contribution. While this stylistic change can make sense on its own, it comes at a cost and risk for the project as a whole. The weak motivation for the change does not justify the burden that it places on the project. A burden could be any of the following:
- Time spent on review
- Accidental introduction of bugs
- (Silent) merge conflicts, either in the branch or a backport branch. Those conflicts demand further developer and reviewer time or introduce bugs.
Generally, if the style is not mentioned nor enforced by the developer notes, we leave it up to the original author to pick whatever fits them best personally and then leave it that way until the line is touched for other reasons.
If you wish to contribute in the future, please focus on creating high-quality, original content that demonstrates a clear understanding of the project's requirements and goals. Also, see the contributing guidelines.
Leave a comment below, if you have any questions.
- maflcko closed this on Jan 28, 2026