consensus: fix panic on POLRound=-1

This commit is contained in:
Ethan Buchman 2016-09-13 16:24:31 -04:00
parent 57da2e4af5
commit 7afcf92539
1 changed files with 1 additions and 1 deletions

View File

@ -623,7 +623,7 @@ OUTER_LOOP:
{
rs := conR.conS.GetRoundState()
prs := ps.GetRoundState()
if rs.Height == prs.Height {
if rs.Height == prs.Height && prs.ProposalPOLRound >= 0 {
if maj23, ok := rs.Votes.Prevotes(prs.ProposalPOLRound).TwoThirdsMajority(); ok {
peer.TrySend(DataChannel, struct{ ConsensusMessage }{&VoteSetMaj23Message{
Height: prs.Height,