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: Max revocations in block sanity. #1034

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Feb 15, 2018

This moves the check for validating that the number of revocations does not exceed the maximum allowed to the checkBlockSanity function where it more naturally belongs since it does not require access to any previous chain context.

It should be noted that this check previously used math.MaxUint8 and was rather implicitly limited by the fact the header uses a uint8 for the field, so this makes the requirement more explicit by defining a constant.

@davecgh davecgh force-pushed the blockchain_validate_max_revocations_block_sanity branch from 3a81189 to 44b4f19 Compare February 15, 2018 17:50
@davecgh davecgh force-pushed the blockchain_validate_max_revocations_block_sanity branch 2 times, most recently from 17074fd to 52666d8 Compare February 15, 2018 18:01
This moves the check for validating that the number of revocations does
not exceed the maximum allowed to the checkBlockSanity function where it
more naturally belongs since it does not require access to any previous
chain context.

It should be noted that this check previously used math.MaxUint8 and was
rather implicitly limited by the fact the header uses a uint8 for the
field, so this makes the requirement more explicit by defining a
constant.
@davecgh davecgh force-pushed the blockchain_validate_max_revocations_block_sanity branch from 52666d8 to 8eda558 Compare February 15, 2018 18:43
@davecgh davecgh merged commit 8eda558 into decred:master Feb 15, 2018
@davecgh davecgh deleted the blockchain_validate_max_revocations_block_sanity branch February 15, 2018 20:37
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.

None yet

3 participants