Skip to content

Do not set the "best header" to a header that has a lower number than before #1518

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 2 commits into from
May 8, 2019

Conversation

majecty
Copy link
Contributor

@majecty majecty commented May 8, 2019

This fixes #1514

@majecty majecty added the bug Something isn't working label May 8, 2019
@majecty majecty requested a review from sgkim126 May 8, 2019 05:46
@sgkim126
Copy link
Contributor

sgkim126 commented May 8, 2019

What should we do if the score of the committed header is greater than the current one even the number is lower?
I think it will not happen in PBFT but can happen in PoW.

@majecty
Copy link
Contributor Author

majecty commented May 8, 2019

The function "update_best_as_committed" only be called in Tendermint consensus. The function should not be called If the consensus is PoW.

@mergify mergify bot merged commit 3c0202d into CodeChain-io:master May 8, 2019
@majecty majecty deleted the f/best_header branch July 1, 2019 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tendermint replaces the "beset header" with a lower-scoring header.
2 participants