Currently difficulty adjustment violations are not reported for chains that branch off before the last checkpoint. Change this by moving the checkpoint check after the difficulty check.
Avoid masking of difficulty adjustment errors by checkpoints #11028
pull sipa wants to merge 1 commits into bitcoin:master from sipa:20170810_maskpow changing 1 files +15 −27-
sipa commented at 12:14 AM on August 11, 2017: member
-
85c82b50d1
Avoid masking of difficulty adjustment errors by checkpoints
Currently difficulty adjustment violations are not reported for chains that branch off before the last checkpoint. Change this by moving the checkpoint check after the difficulty check.
- fanquake added the label Validation on Aug 11, 2017
- gmaxwell approved
-
gmaxwell commented at 3:33 AM on August 11, 2017: contributor
ACK
-
sdaftuar commented at 2:55 PM on August 11, 2017: member
ACK
-
in src/validation.cpp:2833 in 85c82b50d1
2829 | @@ -2830,22 +2830,6 @@ bool CheckBlock(const CBlock& block, CValidationState& state, const Consensus::P 2830 | return true; 2831 | } 2832 | 2833 | -static bool CheckIndexAgainstCheckpoint(const CBlockIndex* pindexPrev, CValidationState& state, const CChainParams& chainparams, const uint256& hash)
promag commented at 11:26 PM on August 11, 2017:Could keep even though it's called once?
promag commented at 11:27 PM on August 11, 2017: memberutACK 85c82b5.
laanwj commented at 2:12 PM on August 14, 2017: memberutACK 85c82b5
laanwj merged this on Aug 14, 2017laanwj closed this on Aug 14, 2017laanwj referenced this in commit 6bdf4b3c7c on Aug 14, 2017PastaPastaPasta referenced this in commit 2e43b48349 on Sep 8, 2019PastaPastaPasta referenced this in commit 9501f31088 on Sep 18, 2019PastaPastaPasta referenced this in commit fda3ffa105 on Sep 20, 2019PastaPastaPasta referenced this in commit e941c9ba5a on Sep 20, 2019barrystyle referenced this in commit 3d486b8952 on Jan 22, 2020DrahtBot locked this on Sep 8, 2021
github-metadata-mirror
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-04-19 09:15 UTC
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-04-19 09:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me