Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
iturricf committed Oct 26, 2023
1 parent 02c1b9c commit fce83fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions relayer/middleware/missedVaasV3/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,20 @@ export async function checkForMissedVaas(
let missingSequences: bigint[] = [];

if (seenSequences.length) {
const first = (previousSafeSequence !== null && previousSafeSequence < seenSequences[0]) ? previousSafeSequence : seenSequences[0];
const first =
previousSafeSequence !== null && previousSafeSequence < seenSequences[0]
? previousSafeSequence
: seenSequences[0];
const last = seenSequences[seenSequences.length - 1];
logger?.info(
`Scanning sequences from ${first} to ${last} for missing sequences`,
);
// Check if there is any leap between the sequences seen,
// and try reprocessing them if any:
if (previousSafeSequence !== null && previousSafeSequence < seenSequences[0]) {
if (
previousSafeSequence !== null &&
previousSafeSequence < seenSequences[0]
) {
seenSequences.unshift(previousSafeSequence);
}
missingSequences = scanForSequenceLeaps(seenSequences);
Expand Down Expand Up @@ -339,8 +345,6 @@ async function lookAhead(
lastVisitedSequence = BigInt(vaa.sequence);
}



return { lookAheadSequences, processed, failedToRecover };
}

Expand Down
4 changes: 2 additions & 2 deletions relayer/middleware/missedVaasV3/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function batchMarkAsSeen(
redis,
getFailedToFetchKey(prefix, emitterChain, emitterAddress),
sequences,
)
),
]);
}

Expand Down Expand Up @@ -351,4 +351,4 @@ async function batchRemoveFromSet(
}

return pipeline.exec();
}
}

0 comments on commit fce83fd

Please sign in to comment.