Skip to content

Commit

Permalink
feat(blocks): allow index finalized blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
dnoishi committed Aug 18, 2023
1 parent 05e2d59 commit c6d845d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions substrate/substrate-ingest/src/ingest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,12 @@ export class Ingest {
}

private async getChainHeight(): Promise<number> {
let hash = await this.client.call('chain_getFinalizedHead')
let hash = await this.client.call('chain_getHead')
return this.client.call<sub.BlockHeader>('chain_getHeader', [hash])
.then(header => {
let height = parseInt(header.number)
assert(Number.isSafeInteger(height))
return height
if (height%10 === 0) return height
}).catch(withErrorContext({
blockHash: hash
}))
Expand Down

0 comments on commit c6d845d

Please sign in to comment.