|
|
|
@ -113,6 +113,10 @@ func (consensus *Consensus) onPrepared(msg *msg_pb.Message) { |
|
|
|
|
Msg("Wrong BlockNum Received, ignoring!") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if recvMsg.BlockNum > consensus.blockNum { |
|
|
|
|
consensus.getLogger().Warn().Msgf("[OnPrepared] low consensus block number. Spin sync") |
|
|
|
|
consensus.spinUpStateSync() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// check validity of prepared signature
|
|
|
|
|
blockHash := recvMsg.BlockHash |
|
|
|
@ -148,12 +152,6 @@ func (consensus *Consensus) onPrepared(msg *msg_pb.Message) { |
|
|
|
|
if !consensus.onPreparedSanityChecks(&blockObj, recvMsg) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if recvMsg.BlockNum > consensus.blockNum { |
|
|
|
|
consensus.getLogger().Warn().Msgf("[OnPrepared] low consensus block number. Spin sync") |
|
|
|
|
consensus.spinUpStateSync() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
consensus.mutex.Lock() |
|
|
|
|
defer consensus.mutex.Unlock() |
|
|
|
|
|
|
|
|
@ -239,6 +237,10 @@ func (consensus *Consensus) onCommitted(msg *msg_pb.Message) { |
|
|
|
|
Msg("Wrong BlockNum Received, ignoring!") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if recvMsg.BlockNum > consensus.blockNum { |
|
|
|
|
consensus.getLogger().Info().Msg("[OnCommitted] low consensus block number. Spin up state sync") |
|
|
|
|
consensus.spinUpStateSync() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
aggSig, mask, err := consensus.ReadSignatureBitmapPayload(recvMsg.Payload, 0) |
|
|
|
|
if err != nil { |
|
|
|
|