Skip to content

Conversation

@luke-jr
Copy link

@luke-jr luke-jr commented Jul 15, 2017

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.

return pindexLast->nBits;
} else {
// Go back by what we want to be 14 days worth of blocks
int nHeightFirst = pindexLast->nHeight - (params.DifficultyAdjustmentInterval()-1);

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;

Copy link
Author

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);

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;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please comment on PR #5 stuff on PR #5

consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000003f94d1ad391682fe038bf5");

consensus.HardforkTime = std::numeric_limits<int64_t>::max();
consensus.nPowChangeTargetShift = 20;

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.

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants