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: Block sanity cleanup and consistency. #1012

Merged
merged 1 commit into from
Feb 2, 2018

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Feb 2, 2018

This requires PRs #1008, #1009, #1010, and #1011.

This cleans up the checkBlockSanity and make it more consistent with the rest of the code base.

The following is an overview of the changes:

  • Use the local variable throughout
  • Check the header values against the expected value instead of the reverse
  • Make the errors more consistent and verbose in some cases
  • Use an int64 for the type so consensus doesn't different between computer architecture
  • Correct and add some comments

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.

ok

This cleans up the checkBlockSanity and make it more consistent with
the rest of the code base.

The following is an overview of the changes:

- Use the local variable throughout
- Check the header values against the expected value instead of the
  reverse
- Make the errors more consistent and verbose in some cases
- Use an int64 for the type so consensus doesn't different between
  computer architecture
- Correct and add some comments
@davecgh davecgh force-pushed the blockchain_checkblocksanity_cleanup branch from 9d9826d to 7c7e6a1 Compare February 2, 2018 17:58
@davecgh davecgh merged commit 7c7e6a1 into decred:master Feb 2, 2018
@davecgh davecgh deleted the blockchain_checkblocksanity_cleanup branch February 2, 2018 18:14
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