Skip to content
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

blockchain/mining: Full checks in CCB. #1017

Merged
merged 1 commit into from
Feb 14, 2018

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Feb 2, 2018

This requires PR #1014.

This modifies the exported CheckConnectBlock function to call the checkBlockSanity and checkBlockContext functions to ensure all validation rules are enforced from the mining code.

Since both the mining code and tests typically work with unsolved blocks, this also introduces a new parameter on CheckConnectBlock to pass behavior flags which allows the caller to skip the proof of work check.

It also modifies forceHeadReorganization to call checkBlockContext for the same reason.

Finally, all tests and call sites are updated with the appropriate flags and various tests are updated for the changes accordingly.

@davecgh davecgh force-pushed the blockchain_checkconnectblock_full branch 2 times, most recently from ef8d92e to cba0f6a Compare February 3, 2018 04:55
Copy link
Contributor

@jolan jolan left a comment

Choose a reason for hiding this comment

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

tOK on testnet.

This modifies the exported CheckConnectBlock function to call the
checkBlockSanity and checkBlockContext functions to ensure all
validation rules are enforced from the mining code.

Since both the mining code and tests typically work with unsolved
blocks, this also introduces a new parameter on CheckConnectBlock to
pass behavior flags which allows the caller to skip the proof of work
check.

It also modifies forceHeadReorganization to call checkBlockContext for
the same reason.

Finally, all tests and call sites are updated with the appropriate
flags and various tests are updated for the changes accordingly.
@davecgh davecgh force-pushed the blockchain_checkconnectblock_full branch from cba0f6a to 21e9a85 Compare February 14, 2018 19:10
@davecgh davecgh merged commit 21e9a85 into decred:master Feb 14, 2018
@davecgh davecgh deleted the blockchain_checkconnectblock_full branch February 14, 2018 19:21
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.

3 participants