Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GossipSubManager.cs #42

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading