Skip to content

Commit 385b18a

Browse files
committed
cloud_functions: add const
1 parent 80ed1aa commit 385b18a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cloud_functions/src/getReobserveVaas.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,14 @@ async function getAndProcessReobsVAAs(): Promise<Map<string, ReobserveInfo>> {
6969
}
7070
vaas = data.VAAs.slice(0, MAX_VAAS_TO_REOBSERVE);
7171
console.log('number of reobserved VAAs', vaas.length);
72+
const MAX_SOLANA_VAAS_TO_REOBSERVE = 2;
7273
// Can only process 2 Solana VAAs at a time due to rpc rate limits
7374
// So we put the rest back in the collection
7475
let solanaCount = 0;
7576
for (const vaa of vaas) {
7677
if (vaa.chain === CHAIN_ID_SOLANA) {
7778
solanaCount++;
78-
if (solanaCount > 2) {
79+
if (solanaCount > MAX_SOLANA_VAAS_TO_REOBSERVE) {
7980
putBack.push(vaa);
8081
continue;
8182
}

0 commit comments

Comments
 (0)