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: CheckConnectBlockTemplate with tests. #1086

Merged

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Feb 25, 2018

This requires PRs #1076, #1077, #1084, and #1085. (now merged)

This removes the CheckConnectBlock function in favor of a new function named CheckConnectBlockTemplate which more accurately reflects its purpose of testing block template proposals and uses this fact to be more restrictive about the allowed inputs and to avoid performing the proof of work check.

In particular, the provided block template must only build from the current tip or its parent or an error is returned.

All mining code has been updated to call the new function accordingly.

Finally, it also adds a full suite of tests for the new function using the chaingen framework in order to ensure proper functionality.

@davecgh davecgh force-pushed the blockchain_checkconnectblocktemplate branch 10 times, most recently from 2a8d44a to 87110b2 Compare March 1, 2018 02:48
@davecgh
Copy link
Member Author

davecgh commented Mar 1, 2018

Rebased to the latest master and resolved conflicts.

Copy link
Member

@dajohi dajohi left a comment

Choose a reason for hiding this comment

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

tOK tesnet2 miner

@davecgh davecgh mentioned this pull request Mar 10, 2018
33 tasks
@davecgh davecgh added this to the 1.3.0 milestone Apr 30, 2018
@davecgh davecgh force-pushed the blockchain_checkconnectblocktemplate branch from 87110b2 to 47c1299 Compare May 2, 2018 20:12
@davecgh davecgh changed the title [BLOCKED] blockchain: CheckConnectBlockTemplate with tests. blockchain: CheckConnectBlockTemplate with tests. May 2, 2018
@davecgh
Copy link
Member Author

davecgh commented May 2, 2018

Rebased to the latest master and resolved conflicts. This is ready to merge now.

@davecgh davecgh force-pushed the blockchain_checkconnectblocktemplate branch from 47c1299 to d6498a9 Compare May 2, 2018 20:22
This removes the CheckConnectBlock function in favor of a new function
named CheckConnectBlockTemplate which more accurately reflects its
purpose of testing block template proposals and uses this fact to be
more restrictive about the allowed inputs and to avoid performing the
proof of work check.

In particular, the provided block template must only build from the
current tip or its parent or an error is returned.

All mining code has been updated to call the new function accordingly.

Finally, it also adds a full suite of tests for the new function using
the chaingen framework in order to ensure proper functionality.
@davecgh davecgh force-pushed the blockchain_checkconnectblocktemplate branch from d6498a9 to 6327ed7 Compare May 3, 2018 18:53
@davecgh davecgh merged commit 6327ed7 into decred:master May 3, 2018
@davecgh davecgh deleted the blockchain_checkconnectblocktemplate branch May 3, 2018 19:09
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