Skip to content

Commit

Permalink
Update GossipSubManager.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
uink45 committed Nov 5, 2024
1 parent b929c81 commit 5cd3fa3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Lantern.Beacon/Networking/Gossip/GossipSubManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private void HandleLightClientFinalityUpdate(PeerId peerId, byte[] update)
{
CheckIfPeerExistsInGossip(peerId);

_logger.LogInformation("Received light client finality update from gossip");
_logger.LogInformation("Received light client finality update from gossip peer {PeerId}", peerId);

var denebFinalizedPeriod = AltairHelpers.ComputeSyncCommitteePeriod(
Phase0Helpers.ComputeEpochAtSlot(syncProtocol.DenebLightClientStore.FinalizedHeader.Beacon.Slot));
Expand All @@ -98,7 +98,7 @@ private void HandleLightClientFinalityUpdate(PeerId peerId, byte[] update)

if (result)
{
_logger.LogInformation("Processed light client finality update from gossip");
_logger.LogInformation("Processed light client finality update from gossip peer {PeerId}", peerId);

if (!DenebHelpers.ShouldForwardFinalizedLightClientUpdate(lightClientFinalityUpdate, oldFinalizedHeader,
syncProtocol))
Expand Down Expand Up @@ -128,7 +128,7 @@ private void HandleLightClientOptimisticUpdate(PeerId peerId, byte[] update)
{
CheckIfPeerExistsInGossip(peerId);

_logger.LogInformation("Received light client optimistic update from gossip");
_logger.LogInformation("Received light client optimistic update from gossip peer {PeerId}", peerId);

var denebFinalizedPeriod = AltairHelpers.ComputeSyncCommitteePeriod(Phase0Helpers.ComputeEpochAtSlot(syncProtocol.DenebLightClientStore.FinalizedHeader.Beacon.Slot));
var denebCurrentPeriod = AltairHelpers.ComputeSyncCommitteePeriod(Phase0Helpers.ComputeEpochAtSlot(Phase0Helpers.ComputeCurrentSlot(syncProtocol.Options.GenesisTime)));
Expand All @@ -144,12 +144,12 @@ private void HandleLightClientOptimisticUpdate(PeerId peerId, byte[] update)

if (result)
{
_logger.LogInformation("Processed light client optimistic update from gossip");
_logger.LogInformation("Processed light client optimistic update from gossip peer {PeerId}", peerId);

if (!DenebHelpers.ShouldForwardLightClientOptimisticUpdate(lightClientOptimisticUpdate, oldOptimisticHeader, syncProtocol))
return;

LightClientFinalityUpdate!.Publish(update);
LightClientOptimisticUpdate!.Publish(update);
_logger.LogDebug("Forwarded light client optimistic update to gossip");

syncProtocol.CurrentLightClientOptimisticUpdate = lightClientOptimisticUpdate;
Expand Down

0 comments on commit 5cd3fa3

Please sign in to comment.