-
Notifications
You must be signed in to change notification settings - Fork 1
PoW algorithm candidate: Keccak #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 0.14-uasf_backup_hardfork
Are you sure you want to change the base?
PoW algorithm candidate: Keccak #10
Conversation
…h the same return
| return pindexLast->nBits; | ||
| } else { | ||
| // Go back by what we want to be 14 days worth of blocks | ||
| int nHeightFirst = pindexLast->nHeight - (params.DifficultyAdjustmentInterval()-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) Would this be more readable?
int nHeightFirst = pindexLast->nHeight + 1 - params.DifficultyAdjustmentInterval;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't new code, just indented. Add ?w=1 to the files/diff URI might help.
But it's also part of #5, not this PR directly...
| int64_t nTryTime; | ||
| ++nMinTime; | ||
| while (nMinTime < nMaxTime) { | ||
| nTryTime = nMinTime + ((nMaxTime - nMinTime) / 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) This may be more readable for the mean of min and max.
nTryTime = (nMinTime + nMaxTime) / 2;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000003f94d1ad391682fe038bf5"); | ||
|
|
||
| consensus.HardforkTime = std::numeric_limits<int64_t>::max(); | ||
| consensus.nPowChangeTargetShift = 20; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this make it scale up by 2^20 whenever the previous period's blocks were too fast? I don't totally grok this constant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes it 2^20 easier whenever the PoW algo changes.
Note this is pre-SHA3 Keccak. It is not compatible with the final SHA3 standard.
I am making it a candidate in this form anyway, because it is already supported by BFGMiner.