[NOD-341] Made ChainChanged not fire if the acceptance index is off. (#419)

This commit is contained in:
stasatdaglabs 2019-09-22 17:59:20 +03:00 committed by Svarog
parent c5108a4abd
commit 683830d574

View File

@ -952,6 +952,12 @@ func (s *Server) handleBlockDAGNotification(notification *blockdag.Notification)
break
}
// If the acceptance index is off we aren't capable of serving
// ChainChanged notifications.
if s.cfg.AcceptanceIndex == nil {
break
}
// Notify registered websocket clients of chain changes.
s.ntfnMgr.NotifyChainChanged(data.RemovedChainBlockHashes,
data.AddedChainBlockHashes)