mirror of
https://github.com/tendermint/tendermint.git
synced 2026-05-31 11:26:20 +00:00
Fix consensus: Send round-skip votes
This commit is contained in:
@@ -78,7 +78,7 @@ WriteBinary(foo, buf, n, err)
|
||||
foo2 := ReadBinary(Foo{}, buf, n, err).(Foo)
|
||||
|
||||
// Or, to decode onto a pointer:
|
||||
foo2 := ReadBinary(&Foo{}, buf, n, err).(*Foo)
|
||||
foo2 := ReadBinaryPtr(&Foo{}, buf, n, err).(*Foo)
|
||||
```
|
||||
|
||||
WriteBinary and ReadBinary can encode/decode structs recursively. However, interface field
|
||||
|
||||
@@ -520,6 +520,18 @@ OUTER_LOOP:
|
||||
continue OUTER_LOOP
|
||||
}
|
||||
}
|
||||
// If there are prevotes to send for the last round...
|
||||
if rs.Round == prs.Round+1 && prs.Step <= RoundStepPrevote {
|
||||
if trySendVote(rs.Votes.Prevotes(prs.Round), &prs.Prevotes) {
|
||||
continue OUTER_LOOP
|
||||
}
|
||||
}
|
||||
// If there are precommits to send for the last round...
|
||||
if rs.Round == prs.Round+1 && prs.Step <= RoundStepPrecommit {
|
||||
if trySendVote(rs.Votes.Precommits(prs.Round), &prs.Precommits) {
|
||||
continue OUTER_LOOP
|
||||
}
|
||||
}
|
||||
// If there are POLPrevotes to send...
|
||||
if 0 <= prs.ProposalPOLRound {
|
||||
if polPrevotes := rs.Votes.Prevotes(prs.ProposalPOLRound); polPrevotes != nil {
|
||||
|
||||
Reference in New Issue
Block a user