mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-07 16:34:06 +00:00
Implement failover for RPC endpoints in watcher (#506)
* Handle RPC endpoint server errors and switch failover endpoints * Add config maxNewBlockRetries for switching to failover endpoint * Upgrade package versions * Move unknown events removal after event processing for historical sync * Rename doFailOverEndpoints to switchClients
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import assert from 'assert';
|
||||
import { DeepPartial, FindConditions, FindManyOptions } from 'typeorm';
|
||||
import { providers } from 'ethers';
|
||||
|
||||
import {
|
||||
IndexerInterface,
|
||||
@@ -338,4 +339,8 @@ export class Indexer implements IndexerInterface {
|
||||
async getFullTransactions (txHashList: string[]): Promise<EthFullTransaction[]> {
|
||||
return [];
|
||||
}
|
||||
|
||||
switchClients ({ ethClient, ethProvider }: { ethClient: EthClient, ethProvider: providers.BaseProvider }): void {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user