Skip to content

Commit

Permalink
fix: check for overflow in configs
Browse files Browse the repository at this point in the history
Signed-off-by: james-a-morris <[email protected]>
  • Loading branch information
james-a-morris committed Nov 27, 2024
1 parent d5167ec commit e4594fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/indexer/src/data-indexing/service/Indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ export class Indexer {
const lastFinalisedBlockOnChain =
latestBlockNumber - this.config.finalisedBlockBufferDistance;

if (lastBlockFinalisedStored === lastFinalisedBlockOnChain) {
if (
lastBlockFinalisedStored !== null &&
lastBlockFinalisedStored >= lastFinalisedBlockOnChain
) {
return {
latestBlockNumber,
blockRange: undefined,
Expand Down

0 comments on commit e4594fe

Please sign in to comment.