Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: wormhole-foundation/wormhole-dashboard
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 385b18a3c6eeae8612ab792d83d5b23e252758e1
Choose a base ref
..
head repository: wormhole-foundation/wormhole-dashboard
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e4de6d91389d52e6ad616dcf23c425c411c659e0
Choose a head ref
Showing with 3 additions and 1 deletion.
  1. +1 −1 watcher/src/consts.ts
  2. +2 −0 watcher/src/watchers/Watcher.ts
2 changes: 1 addition & 1 deletion watcher/src/consts.ts
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ export const TIMEOUT = 0.5 * 1000;
export const RPCS_BY_CHAIN: { [key in Environment]: { [key in ChainName]?: string } } = {
['mainnet']: {
ethereum: process.env.ETH_RPC,
bsc: process.env.BSC_RPC || 'https://rpc.ankr.com/bsc',
bsc: process.env.BSC_RPC || 'https://bsc.publicnode.com',
polygon: process.env.POLYGON_RPC || 'https://rpc.ankr.com/polygon',
avalanche: process.env.AVALANCHE_RPC || 'https://rpc.ankr.com/avalanche',
oasis: process.env.OASIS_RPC || 'https://emerald.oasis.dev',
2 changes: 2 additions & 0 deletions watcher/src/watchers/Watcher.ts
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@ export class Watcher {
let retry = 0;
while (true) {
try {
this.logger.debug(`fromBlock = ${fromBlock}, toBlock = ${toBlock}`);
if (fromBlock !== null && toBlock !== null && fromBlock <= toBlock) {
// fetch logs for the block range, inclusive of toBlock
toBlock = Math.min(fromBlock + this.maximumBatchSize - 1, toBlock);
@@ -67,6 +68,7 @@ export class Watcher {
try {
this.logger.info('fetching finalized block');
toBlock = await this.getFinalizedBlockNumber();
this.logger.debug(`finalized block = ${toBlock}`);
if (fromBlock === null) {
// handle first loop on a fresh chain without initial block set
fromBlock = toBlock;