Skip to content
On this page

Function: resolveCloseBlock()

TypeScript
function resolveCloseBlock(deadlineIso: string, source: BlockTimeSource): Promise<CloseResolution>;

Defined in: vote-core/src/snapshot.ts:47 (opens in a new tab)

H_close (SPEC §0, §4.6): the greatest block whose median_time_past ≤ the deadline, with the chain tip it was read against. height is null while no block's median_time_past has passed the deadline, because a later block could still qualify. Unlike the snapshot it needs no confirmations; an anchored tally is final only once the tip reaches H_close + G + 6. Fails closed on any lookup error.

ParametersLink to this section

ParameterType
deadlineIsostring
sourceBlockTimeSource

ReturnsLink to this section

Promise<CloseResolution>