Skip to content

Commit

Permalink
Merge pull request #178 from helix-bridge/xiaoch05-lvl0-indexer
Browse files Browse the repository at this point in the history
use multi lvl0 indexers
  • Loading branch information
xiaoch05 authored Jul 25, 2024
2 parents 0242d98 + 839453b commit c4a5486
Show file tree
Hide file tree
Showing 8 changed files with 588 additions and 145 deletions.
2 changes: 1 addition & 1 deletion apollo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"generate:schema": "ts-node generate-typings.ts && cp src/graphql.schema.ts src/graphql.ts"
},
"dependencies": {
"@helixbridge/helixconf": "1.0.2",
"@helixbridge/helixconf": "1.0.3",
"@nestjs/apollo": "^10.0.9",
"@nestjs/common": "^8.4.6",
"@nestjs/config": "^2.1.0",
Expand Down
10 changes: 7 additions & 3 deletions apollo/src/base/TransferServiceT2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export enum RecordStatus {
failed,
}

export enum Level0Indexer {
export enum Level0IndexerType {
thegraph,
ponder,
}
Expand All @@ -37,9 +37,13 @@ export interface BridgeBaseConfigure {
takeEachTime: number;
}

export interface Level0Indexer {
indexerType: Level0IndexerType;
url: string;
}

export interface PartnerT2 {
level0Indexer: number;
indexerUrl: string;
level0Indexers: Level0Indexer[];
chainConfig: HelixChainConf;
}

Expand Down
6 changes: 3 additions & 3 deletions apollo/src/lnv2/lnv2.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ export class Lnv2Service implements OnModuleInit {
}
if (records && records.length > 0) {
this.logger.log(
`lnv2 new records, from ${transfer.chainConfig.id}, latest nonce ${latestNonce}, added ${
records.length - ignored
}, ignored ${ignored}`
`lnv2 new records, from ${
transfer.chainConfig.id
}, latest nonce ${latestNonce}, added ${records.length - ignored}, ignored ${ignored}`
);
}
this.fetchCache[index].latestNonce = latestNonce;
Expand Down
Loading

0 comments on commit c4a5486

Please sign in to comment.