From f4168eacd394b65c2f38a7bc3787a7930c4363a4 Mon Sep 17 00:00:00 2001 From: uink45 <79078981+uink45@users.noreply.github.com> Date: Mon, 21 Oct 2024 14:01:55 +1000 Subject: [PATCH] Update GossipSubManager.cs --- src/Lantern.Beacon/Networking/Gossip/GossipSubManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) 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)