Skip to content

Commit

Permalink
Add debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
nkryuchkov committed Mar 10, 2022
1 parent 306f9a6 commit 3207da7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ibft/controller/controller_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 3207da7

Please sign in to comment.