Skip to content

Commit

Permalink
filter offline relayer
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoch05 committed Mar 12, 2024
1 parent 43a94de commit ce74f16
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apollo/src/aggregation/aggregation.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,14 @@ export class AggregationResolver {
where,
});
let supportChains = new Map();
const now = Math.floor(Date.now() / 1000);
for (const record of records.records) {
if (record.heartbeatTimestamp + this.heartbeatTimeout < now) {
continue;
}

let toChains = supportChains.get(record.fromChain);

if (!toChains) {
supportChains.set(record.fromChain, [ record.toChain ]);
} else {
Expand Down

0 comments on commit ce74f16

Please sign in to comment.