diff options
-rw-r--r-- | core/consensus.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/consensus.go b/core/consensus.go index c7bef4b..9e6768c 100644 --- a/core/consensus.go +++ b/core/consensus.go @@ -81,6 +81,10 @@ func (recv *consensusBAReceiver) ProposeVote(vote *types.Vote) { func (recv *consensusBAReceiver) ProposeBlock() common.Hash { block := recv.consensus.proposeBlock(recv.chainID, recv.round) + if block == nil { + recv.consensus.logger.Error("unable to propose block") + return nullBlockHash + } recv.consensus.baModules[recv.chainID].addCandidateBlock(block) if err := recv.consensus.preProcessBlock(block); err != nil { recv.consensus.logger.Error("Failed to pre-process block", "error", err) |