Skip to content

Move to Commit state if enough precommits are collected #1771

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

Merged
merged 3 commits into from
Sep 11, 2019

Conversation

majecty
Copy link
Contributor

@majecty majecty commented Sep 10, 2019

No description provided.

Since TendermintState has more information than Step, using
TendermintState is better. Also, if TendermintState::Commit has
block_hash as a field, Step -> TendermintState conversion will be
broken.
return
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before this PR, previous rounds' precommit is ignored.
After this PR, previous rounds' precommits are enough received, the node moves to Commit state.

cwarn!(ENGINE, "Cannot find a proposal which committed");
self.increment_view(1);
Some(Step::Propose)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before this PR, if the committed block is not imported when moving to the Commit state, the node moves to the next round.
After this PR, the node moves to Commit state and waits for the block.

@majecty majecty force-pushed the f/commit-block-import branch from 011ca48 to f63dbcc Compare September 11, 2019 06:51
@majecty majecty merged commit 47870a4 into CodeChain-io:master Sep 11, 2019
@majecty majecty deleted the f/commit-block-import branch September 11, 2019 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants