Commit 7005766
committed
Merge bitcoin/bitcoin#29299: validation: fix misleading checkblockindex comments
9819db4 validation: move nChainTx assert down in CheckBlockIndex (Martin Zumsande)
033477d doc: fix checkblockindex comments (Martin Zumsande)
Pull request description:
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
ACKs for top commit:
maflcko:
ACK 9819db4 🌦
naumenkogs:
ACK 9819db4
ryanofsky:
Code review ACK 9819db4. Thanks for figuring this issue out and fixing it. Would suggest changing pr name from "improve comments" to "fix misleading comments" since previous comments were wrong about the reasons the conditions are needed.
Tree-SHA512: 3f77791253eb0c97f8153dd8ae1c567f43f6387ea7a53efea94817463c672a4e11d548aa7eff62235346ff0713ff4d6fe08f9ec50d0c30a1e6b6d27b9918b4191 file changed
+9
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4862 | 4862 | | |
4863 | 4863 | | |
4864 | 4864 | | |
4865 | | - | |
4866 | | - | |
4867 | | - | |
4868 | | - | |
4869 | | - | |
4870 | | - | |
4871 | | - | |
4872 | | - | |
4873 | | - | |
4874 | | - | |
4875 | 4865 | | |
4876 | 4866 | | |
4877 | 4867 | | |
| |||
4954 | 4944 | | |
4955 | 4945 | | |
4956 | 4946 | | |
| 4947 | + | |
| 4948 | + | |
| 4949 | + | |
| 4950 | + | |
| 4951 | + | |
| 4952 | + | |
| 4953 | + | |
| 4954 | + | |
| 4955 | + | |
4957 | 4956 | | |
4958 | 4957 | | |
4959 | 4958 | | |
| |||
0 commit comments