Skip to content

Commit

Permalink
Merge pull request #1 from subspace/feat/allow-index-not-finalized-bl…
Browse files Browse the repository at this point in the history
…ocks

feat(blocks): allow index finalized blocks
  • Loading branch information
dnoishi authored Aug 18, 2023
2 parents 05e2d59 + c6d845d commit 05c2867
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 05c2867

Please sign in to comment.