diff --git a/src/Lantern.Beacon/Networking/Gossip/GossipSubManager.cs b/src/Lantern.Beacon/Networking/Gossip/GossipSubManager.cs index 299486f..d8cd10e 100644 --- a/src/Lantern.Beacon/Networking/Gossip/GossipSubManager.cs +++ b/src/Lantern.Beacon/Networking/Gossip/GossipSubManager.cs @@ -169,6 +169,12 @@ private void HandleLightClientOptimisticUpdate(PeerId peerId, byte[] update) private void CheckIfPeerExistsInGossip(PeerId peerId) { + if (!syncProtocol.IsInitialised) + { + _logger.LogDebug("Sync protocol is not initialized. Ignore gossip message"); + return; + } + var foundLivePeer = false; foreach (var gossipPeer in peerState.GossipPeers.Keys)