Skip to content

Commit

Permalink
Remove light client latest cached slot
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain committed Oct 19, 2022
1 parent 824700c commit 50fe56f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions packages/beacon-node/src/chain/lightClient/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ export class LightClientServer {
private readonly knownSyncCommittee = new MapDef<SyncPeriod, Set<DependantRootHex>>(() => new Set());
private storedCurrentSyncCommittee = false;

latestForwardedFinalitySlot: Slot = 0;
latestForwardedOptimisticSlot: Slot = 0;

/**
* Keep in memory since this data is very transient, not useful after a few slots
*/
Expand Down Expand Up @@ -500,7 +497,6 @@ export class LightClientServer {
// TODO: Once SyncAggregate are constructed from P2P too, count bits to decide "best"
if (!this.latestHeadUpdate || attestedData.attestedHeader.slot > this.latestHeadUpdate.attestedHeader.slot) {
this.latestHeadUpdate = headerUpdate;
this.latestForwardedOptimisticSlot = this.latestHeadUpdate.attestedHeader.slot;
this.metrics?.lightclientServer.onSyncAggregate.inc({event: "update_latest_head_update"});
}

Expand All @@ -520,7 +516,6 @@ export class LightClientServer {
finalityBranch: attestedData.finalityBranch,
signatureSlot,
};
this.latestForwardedFinalitySlot = this.finalized.attestedHeader.slot;
this.emitter.emit(ChainEvent.lightClientFinalityUpdate, this.finalized);
this.metrics?.lightclientServer.onSyncAggregate.inc({event: "update_latest_finalized_update"});
}
Expand Down

0 comments on commit 50fe56f

Please sign in to comment.