UNPKG

@lodestar/beacon-node

Version:

A Typescript implementation of the beacon chain

20 lines 1.13 kB
import { RootHex } from "@lodestar/types"; import { BlockInputSyncCacheItem, PendingBlockInput } from "../types.js"; export declare function getAllDescendantBlocks(blockRootHex: RootHex, blocks: Map<RootHex, BlockInputSyncCacheItem>): BlockInputSyncCacheItem[]; export type UnknownAndAncestorBlocks = { unknowns: BlockInputSyncCacheItem[]; ancestors: PendingBlockInput[]; }; /** * Returns two arrays. * The first one has the earliest blocks that are not linked to fork-choice yet, meaning they require parent blocks to be pulled. * The second one has the earliest blocks that are linked to fork-choice, meaning they are ready to be processed. * * Given this chain segment unknown block n => downloaded block n + 1 => downloaded block n + 2 * return `{incomplete: [n], ancestors: []}` * * Given this chain segment: downloaded block n => downloaded block n + 1 => downloaded block n + 2 * return {incomplete: [], ancestors: [n]} */ export declare function getUnknownAndAncestorBlocks(blocks: Map<RootHex, BlockInputSyncCacheItem>): UnknownAndAncestorBlocks; //# sourceMappingURL=pendingBlocksTree.d.ts.map