diff --git a/ibft/controller/controller_sync.go b/ibft/controller/controller_sync.go index fd70b9f39f..759941c20e 100644 --- a/ibft/controller/controller_sync.go +++ b/ibft/controller/controller_sync.go @@ -36,6 +36,14 @@ func (i *Controller) processSyncQueueMessages() { func (i *Controller) ProcessSyncMessage(msg *network.SyncChanObj) { var lastChangeRoundMsg *proto.SignedMessage currentInstaceSeqNumber := int64(-1) + if i.currentInstance != nil { + if i.currentInstance.State() == nil { + i.logger.Warn("ProcessSyncMessage: i.currentInstance != nil but i.currentInstance.State() == nil") + } else if i.currentInstance.State().SeqNumber == nil { + i.logger.Warn("ProcessSyncMessage: i.currentInstance != nil && i.currentInstance.State() != nil " + + "but i.currentInstance.State().SeqNumber == nil") + } + } if i.currentInstance != nil && i.currentInstance.State() != nil && i.currentInstance.State().SeqNumber != nil { lastChangeRoundMsg = i.currentInstance.GetLastChangeRoundMsg() currentInstaceSeqNumber = int64(i.currentInstance.State().SeqNumber.Get())