fixing the bug, where we were adding roundchange message and not preparedRound message to preparedMessages roundchangeset

This commit is contained in:
Jitendra Bhurat 2020-06-01 13:38:23 -04:00
parent 240c69670f
commit 614e3d5b94
1 changed files with 1 additions and 6 deletions

View File

@ -214,12 +214,7 @@ func (rcs *roundChangeSet) Add(r *big.Int, msg *message, preparedRound *big.Int,
return err
}
if rcs.preparedMessages[round] == nil {
rcs.preparedMessages[round] = newMessageSet(rcs.validatorSet)
}
if err := rcs.preparedMessages[round].Add(msg); err != nil {
return err
}
rcs.preparedMessages[round] = preparedMessages
if rcs.preparedRounds == nil {
rcs.preparedRounds = make(map[uint64]*big.Int)