From 33927a4b72ab052148faa4663890b86541e7ac30 Mon Sep 17 00:00:00 2001 From: julian merlo Date: Mon, 25 Mar 2024 10:04:53 -0300 Subject: [PATCH] Mapped testnet rpc --- blockchain-watcher/config/default.json | 7 ++++++- .../src/domain/actions/wormchain/PollWormchain.ts | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/blockchain-watcher/config/default.json b/blockchain-watcher/config/default.json index d7a21f61..ad7bcaf2 100644 --- a/blockchain-watcher/config/default.json +++ b/blockchain-watcher/config/default.json @@ -202,7 +202,12 @@ "name": "wormchain", "network": "testnet", "chainId": 3104, - "rpcs": ["https://wormchain-testnet.jumpisolated.com"], + "rpcs": [ + "https://gateway.testnet.xlabs.xyz", + "https://gateway-01.testnet.xlabs.xyz", + "https://gateway-02.testnet.xlabs.xyz", + "https://gateway-03.testnet.xlabs.xyz" + ], "timeout": 10000 } } diff --git a/blockchain-watcher/src/domain/actions/wormchain/PollWormchain.ts b/blockchain-watcher/src/domain/actions/wormchain/PollWormchain.ts index 36ffdd76..3024313e 100644 --- a/blockchain-watcher/src/domain/actions/wormchain/PollWormchain.ts +++ b/blockchain-watcher/src/domain/actions/wormchain/PollWormchain.ts @@ -7,7 +7,6 @@ const ID = "watch-wormchain-logs"; export class PollWormchain extends RunPollingJob { protected readonly logger: winston.Logger; - private readonly metadataRepo: MetadataRepository; private readonly getWormchain: GetWormchainLogs; private readonly blockRepo: WormchainRepository; @@ -51,7 +50,6 @@ export class PollWormchain extends RunPollingJob { `[hasNext] PollWormchain: (${this.cfg.id}) Finished processing all blocks from ${this.cfg.fromBlock} to ${this.cfg.toBlock}` ); } - return !hasFinished; } @@ -84,7 +82,7 @@ export class PollWormchain extends RunPollingJob { let fromBlock = this.blockHeightCursor ? this.blockHeightCursor + 1n : this.cfg.fromBlock ?? latestBlockHeight; - // fromBlock is configured and is greater than current block height, then we allow to skip blocks. + // fromBlock is configured and is greater than current block height, then we allow to skip blocks if ( this.blockHeightCursor && this.cfg.fromBlock &&