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

Function fetchBlocksBatchesLight

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

Source from the content-addressed store, hash-verified

477}
478
479export async function fetchBlocksBatchesLight(
480 api: ApiPromise,
481 blockArray: number[],
482): Promise<IBlock<LightBlockContent>[]> {
483 return Promise.all(blockArray.map((height) => fetchLightBlock(api, height)));
484}
485
486export function calcInterval(api: ApiPromise): BN {
487 return bnMin(

Callers

nothing calls this directly

Calls 2

fetchLightBlockFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected