diff --git a/package.json b/package.json index 3a94215..1bab8fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "celo-oracle", - "version": "2.0.16-beta", + "version": "2.0.17-beta", "description": "Oracle application to aggregate and report exchange rates to the Celo network", "author": "Celo", "license": "Apache-2.0", diff --git a/src/reporters/block_based_reporter.ts b/src/reporters/block_based_reporter.ts index 25225a7..037cc3b 100644 --- a/src/reporters/block_based_reporter.ts +++ b/src/reporters/block_based_reporter.ts @@ -253,12 +253,15 @@ export class BlockBasedReporter extends BaseReporter { performBlockHeaderChecks(blockHeader: BlockHeader) { // Ensure this is the highest block number we've seen - // Temporary disable this check as it seems to cause issues after the L2 upgrade, likely because of the faster block times - // if (this.highestObservedBlockNumber && blockHeader.number <= this.highestObservedBlockNumber) { - // throw Error( - // `Block number is lower than the highest previously observed block: ${blockHeader.number} <= ${this.highestObservedBlockNumber}` - // ) - // } + if (this.highestObservedBlockNumber && blockHeader.number <= this.highestObservedBlockNumber) { + // Temporary disable this throw as it seems to cause issues after the L2 upgrade, likely because of the faster block times + // throw Error( + // `Block number is lower than the highest previously observed block: ${blockHeader.number} <= ${this.highestObservedBlockNumber}` + // ) + this.logger.warn( + `New Block number (${blockHeader.number}) is lower than the highest previously observed block (${this.highestObservedBlockNumber})` + ) + } const now = Date.now() // now is in ms, and blockHeader.timestamp is in seconds, so we convert it to ms const blockTimestampMs = secondsToMs(blockHeader.timestamp as number)