fix fPowAllowMinDifficultyBlocks #146

Merged
kaykurokawa merged 1 commit from fix_testnet_pow into master 2018-05-25 18:02:37 +02:00
kaykurokawa commented 2018-05-25 01:01:20 +02:00 (Migrated from github.com)

We need to make sure that the new fPowAllowMinDifficultyBlocks only affects block 277299 and onwards, otherwise previous blocks that were created without this logic will be invalid because the difficulty calculations for the block will be incorrect.

We need to make sure that the new fPowAllowMinDifficultyBlocks only affects block 277299 and onwards, otherwise previous blocks that were created without this logic will be invalid because the difficulty calculations for the block will be incorrect.
shyba commented 2018-05-25 01:31:15 +02:00 (Migrated from github.com)

LGTM. I made a comment for a possible small refactor to clarify the condition but then I saw the comment block was also updated and very clear, so I'm ok with it.

LGTM. I made a comment for a possible small refactor to clarify the condition but then I saw the comment block was also updated and very clear, so I'm ok with it.
shyba (Migrated from github.com) approved these changes 2018-05-25 01:32:16 +02:00
@ -19,3 +19,3 @@
return nProofOfWorkLimit;
if (params.fPowAllowMinDifficultyBlocks)
if (params.fPowAllowMinDifficultyBlocks && pindexLast->nHeight >= 277299)
shyba (Migrated from github.com) commented 2018-05-25 01:27:47 +02:00

IMHO without the height check it made sense to simply check for fPowAllowMinDifficultyBlocks, but now that there is a hardcoded height I think it would make sense to explicitly check testnet instead of fPowAllowMinDifficultyBlocks since that's the real case of the condition right?

IMHO without the height check it made sense to simply check for `fPowAllowMinDifficultyBlocks`, but now that there is a hardcoded height I think it would make sense to explicitly check testnet instead of fPowAllowMinDifficultyBlocks since that's the real case of the condition right?
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbrycrd#146
No description provided.