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: Do not accept orphans/genesis block. #1057

Merged
merged 1 commit into from
Feb 19, 2018

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Feb 19, 2018

This modifies the code in maybeAcceptBlock to return an error if there is no previous entry in the block index for a given block indicating it is either an orphan or the genesis block.

The function should never be called in either circumstance since the genesis block is valid by definition and orphans are handled prior to calling the function.

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

@davecgh davecgh force-pushed the blockchain_accept_no_orphans branch from fe9edef to f58aeb2 Compare February 19, 2018 02:21
This modifies the code in maybeAcceptBlock to return an error if there
is no previous entry in the block index for a given block indicating it
is either an orphan or the genesis block.

The function should never be called in either circumstance since the
genesis block is valid by definition and orphans are handled prior to
calling the function.
@davecgh davecgh force-pushed the blockchain_accept_no_orphans branch from f58aeb2 to cc6f0cb Compare February 19, 2018 02:25
@davecgh davecgh merged commit cc6f0cb into decred:master Feb 19, 2018
@davecgh davecgh deleted the blockchain_accept_no_orphans branch February 19, 2018 02:44
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