From 3207da725ad99b61e92d7e29ecf34a311ccb80de Mon Sep 17 00:00:00 2001 From: Nikita Kryuchkov Date: Thu, 10 Mar 2022 11:02:53 +0300 Subject: [PATCH] Add debug logs --- ibft/controller/controller_sync.go | 8 ++++++++ 1 file changed, 8 insertions(+) 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())