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

Function fetchHeaderArray

packages/node/src/utils/substrate.ts:357–364  ·  view source on GitHub ↗
(
  api: ApiPromise,
  blockArray: number[],
)

Source from the content-addressed store, hash-verified

355}
356
357export async function fetchHeaderArray(
358 api: ApiPromise,
359 blockArray: number[],
360): Promise<SubstrateHeader[]> {
361 return Promise.all(
362 blockArray.map(async (height) => getHeaderByHeight(api, height)),
363 );
364}
365
366export async function fetchEventsRange(
367 api: ApiPromise,

Callers

nothing calls this directly

Calls 2

getHeaderByHeightFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected