Skip to content

Commit

Permalink
fix(hydra-indexer): force head to BLOCK_HEIGHT if the indexer is behind
Browse files Browse the repository at this point in the history
affects: @subsquid/hydra-indexer
  • Loading branch information
dzhelezov committed Sep 9, 2021
1 parent 6be7119 commit a56a0e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hydra-indexer/src/db/dal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function getIndexerHead(): Promise<number> {
])
}

if (actualHeight === -1) {
if (actualHeight === -1 || actualHeight < conf().BLOCK_HEIGHT) {
return conf().BLOCK_HEIGHT - 1
} else {
return Number(actualHeight)
Expand Down

0 comments on commit a56a0e9

Please sign in to comment.