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
consensus: stricter on LastCommitRound check #4970
Conversation
LastCommitRound should always be >= 0 for heights > 1. In State.updateToState, last precommit is computed only when round greater than -1 and has votes. But "LastCommit" is always updated regardless of the condition. If there's no last precommit, "LastCommit" is set to (*types.VoteSet)(nil). That's why "LastCommit" can be -1 for heights > 1. To fix it, only update State.RoundState.LastCommit when there is last precommit. Fixes #2737
👋 Thanks for creating a PR! Before we can merge this PR, please make sure that all the following items have been
Thank you for your contribution to Tendermint! 🚀 |
tendermint/consensus/reactor.go Line 103 in 2737d3a
|
Codecov Report
@@ Coverage Diff @@
## master #4970 +/- ##
==========================================
- Coverage 63.38% 63.22% -0.16%
==========================================
Files 181 181
Lines 19080 19088 +8
==========================================
- Hits 12093 12069 -24
- Misses 5963 5986 +23
- Partials 1024 1033 +9
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #2737