diff --git a/binary/README.md b/binary/README.md index c490d0e57..9a4fa714f 100644 --- a/binary/README.md +++ b/binary/README.md @@ -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 diff --git a/consensus/reactor.go b/consensus/reactor.go index 56a873d32..0218f77cc 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -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 {