Skip to content

Commit d015d56

Browse files
committed
cloud_functions: remove refTime check
1 parent 37b81ea commit d015d56

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

cloud_functions/src/alarmMissingVaas.ts

+1-9
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,7 @@ export async function alarmMissingVaas(req: any, res: any) {
9595
for (let i = 0; i < msgs.messages.length; i++) {
9696
// Check the timestamp and only send messages that are older than MISS_THRESHOLD_IN_MINS
9797
const msg: ObservedMessage = msgs.messages[i];
98-
// If there is a reference time for this chain, use it. Otherwise, use the current time.
99-
let timeToCheck = getMissThreshold(now, chainId);
100-
if (refTimes[chainId]) {
101-
let refTime = refTimes[chainId]?.latestTime;
102-
if (refTime) {
103-
const refDateTime = new Date(refTime);
104-
timeToCheck = getMissThreshold(refDateTime, chainId);
105-
}
106-
}
98+
const timeToCheck = getMissThreshold(now, chainId);
10799
if (msg.timestamp < timeToCheck) {
108100
let vaaKey: string = `${msg.chain}/${msg.emitter}/${msg.seq}`;
109101
if (firestoreMap.has(vaaKey)) {

0 commit comments

Comments
 (0)