MCPcopy Create free account
hub / github.com/subquery/subql / getBlockHeight

Function getBlockHeight

packages/node-core/src/indexer/dictionary/utils.ts:7–12  ·  view source on GitHub ↗
(block: number | IBlock<B>)

Source from the content-addressed store, hash-verified

5import {IBlock} from '../../indexer';
6
7export function getBlockHeight<B>(block: number | IBlock<B>): number {
8 if (typeof block === 'number') {
9 return block;
10 }
11 return block.getHeader().blockHeight;
12}
13
14export function mergeNumAndBlocks<FB>(
15 numberBlocks: number[],

Callers 5

filterBypassBlocksFunction · 0.90
enqueueBlocksMethod · 0.90
fetchBlocksFromQueueMethod · 0.90
mergeNumAndBlocksFunction · 0.85
mergeNumAndBlocksToNumsFunction · 0.85

Calls 1

getHeaderMethod · 0.80

Tested by

no test coverage detected