[viewchange] handle conseneus message construct errors

Signed-off-by: Leo Chen <leo@harmony.one>
pull/3388/head
Leo Chen 4 years ago
parent 67a167eb3a
commit fd84f847e0
  1. 6
      consensus/validator.go

@ -102,11 +102,15 @@ func (consensus *Consensus) sendCommitMessages(blockObj *types.Block) {
continue continue
} }
networkMessage, _ := consensus.construct( networkMessage, err := consensus.construct(
msg_pb.MessageType_COMMIT, msg_pb.MessageType_COMMIT,
commitPayload, commitPayload,
&key, &key,
) )
if err != nil {
consensus.getLogger().Warn().Msg("[sendCommitMessages] cannot construct network message")
continue
}
if consensus.current.Mode() != Listening { if consensus.current.Mode() != Listening {
if err := consensus.msgSender.SendWithoutRetry( if err := consensus.msgSender.SendWithoutRetry(

Loading…
Cancel
Save