Implement switching endpoints after slow eth_getLogs RPC requests (#525)

* Switch upstream endpoint if getLogs requests are too slow

* Refactor methods for switching client to indexer

* Update codegen indexer template

* Add dummy methods in graph-node test Indexer

* Upgrade package versions to 0.2.101

---------

Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
2024-06-20 17:57:01 +05:30
committed by GitHub
co-authored by prathamesh
parent ff471da287
commit b9a899aec1
24 changed files with 162 additions and 108 deletions
+5 -1
View File
@@ -340,7 +340,11 @@ export class Indexer implements IndexerInterface {
return [];
}
switchClients ({ ethClient, ethProvider }: { ethClient: EthClient, ethProvider: providers.BaseProvider }): void {
async switchClients (): Promise<void> {
return undefined;
}
async isGetLogsRequestsSlow (): Promise<boolean> {
return false;
}
}