Skip to content

Commit

Permalink
Patch for rpc spam
Browse files Browse the repository at this point in the history
  • Loading branch information
lukecaan committed Nov 21, 2023
1 parent 18f8adf commit 5777da0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ts/sdk/src/competitionClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,12 @@ export class CompetitionsClient {

let earliestPulledSlot = Number.MAX_SAFE_INTEGER;

while (!fetchedAllLogs) {
let loopCount = 0;
// REMOVE LATER : luke/sweepstakes-rpc-patch
const maxLoopCount = 20;

while (!fetchedAllLogs && loopCount < maxLoopCount) {
loopCount++;
const response = await fetchLogs(
this.driftClient.connection,
this.program.programId,
Expand Down

0 comments on commit 5777da0

Please sign in to comment.