bitcoin
bitcoin copied to clipboard
validation: fix misleading checkblockindex comments
The two assumptions there were described as test-only, which has led to confusion whether they should exist. However, they are necessary in general, as the changed comment explains - without them, the check would fail everywhere where it is enabled. The second commit moves this assert down to the other checks.
Closes #29261
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Code Coverage
For detailed information about the code coverage, see the test coverage report.
Reviews
See the guideline for information on the review process.
Type | Reviewers |
---|---|
ACK | ryanofsky, maflcko, naumenkogs |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
ACK 9819db4ccaa03519a78d4d9ecce9f89f5be669e5 🌦
Show signature
Signature:
untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
trusted comment: ACK 9819db4ccaa03519a78d4d9ecce9f89f5be669e5 🌦
/nSt0HlzU30n9tRv3NbydVteYOku+aPTyCh6PYQEjYJEORLApik/3CZKJsb6mUFPkY5ZQj5R4YjViUjIDo8GBg==
Changed the title as suggested.
I also think it would be good to split up the assert and make it stricter, so feel free to use the code from #29261 (comment)
The suggestion looks good to me just by reading the code, but I want to test it more before including it. Will either update the PR in a few days, or alternatively (I don't mind either way) that could be a follow-up to this trivial doc-only PR.
ACK 9819db4ccaa03519a78d4d9ecce9f89f5be669e5