fix timeout skip condition (#659)

Co-authored-by: 賴怡誠 <laiyicheng@makotos-MBP.lan>
This commit is contained in:
Liam 2024-09-30 21:32:22 -07:00 committed by GitHub
parent 37f2320af6
commit e6190dd25f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -654,7 +654,7 @@ func (x *XDPoS_v2) VoteHandler(chain consensus.ChainReader, voteMsg *types.Vote)
3. Broadcast(Not part of consensus)
*/
func (x *XDPoS_v2) VerifyTimeoutMessage(chain consensus.ChainReader, timeoutMsg *types.Timeout) (bool, error) {
if timeoutMsg.Round <= x.currentRound {
if timeoutMsg.Round < x.currentRound {
log.Debug("[VerifyTimeoutMessage] Disqualified timeout message as the proposed round does not match currentRound", "timeoutHash", timeoutMsg.Hash(), "timeoutRound", timeoutMsg.Round, "currentRound", x.currentRound)
return false, nil
}