UNPKG

@lodestar/beacon-node

Version:

A Typescript implementation of the beacon chain

29 lines 1.56 kB
import { Slot } from "@lodestar/types"; import { Metrics } from "../../metrics/metrics.js"; import { JobItemQueue } from "../../util/queue/index.js"; import type { BeaconChain } from "../chain.js"; import { BlockProcessOpts } from "../options.js"; import { IBlockInput } from "./blockInput/types.js"; import { PayloadEnvelopeInput } from "./payloadEnvelopeInput/payloadEnvelopeInput.js"; import { ImportBlockOpts } from "./types.js"; export { AttestationImportOpt, type ImportBlockOpts } from "./types.js"; /** * BlockProcessor processes block jobs in a queued fashion, one after the other. */ export declare class BlockProcessor { readonly jobQueue: JobItemQueue<[IBlockInput[], Map<Slot, PayloadEnvelopeInput> | null, ImportBlockOpts], void>; constructor(chain: BeaconChain, metrics: Metrics | null, opts: BlockProcessOpts, signal: AbortSignal); processBlocksJob(job: IBlockInput[], payloadEnvelopes: Map<Slot, PayloadEnvelopeInput> | null, opts?: ImportBlockOpts): Promise<void>; } /** * Validate and process a block * * The only effects of running this are: * - forkChoice update, in the case of a valid block * - various events emitted: checkpoint, forkChoice:*, head, block, error:block * - (state cache update, from state regeneration) * * All other effects are provided by downstream event handlers */ export declare function processBlocks(this: BeaconChain, blocks: IBlockInput[], payloadEnvelopes: Map<Slot, PayloadEnvelopeInput> | null, opts: BlockProcessOpts & ImportBlockOpts): Promise<void>; //# sourceMappingURL=index.d.ts.map