bitcoin icon indicating copy to clipboard operation
bitcoin copied to clipboard

validation: fix misleading checkblockindex comments

Open mzumsande opened this issue 1 year ago • 3 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

mzumsande avatar Jan 23 '24 23:01 mzumsande

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.

DrahtBot avatar Jan 23 '24 23:01 DrahtBot

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==

maflcko avatar Jan 25 '24 12:01 maflcko

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.

mzumsande avatar Jan 25 '24 15:01 mzumsande

ACK 9819db4ccaa03519a78d4d9ecce9f89f5be669e5

naumenkogs avatar Jan 30 '24 09:01 naumenkogs