Skip to main content

templateFreshness

@totemsdk/txpow


@totemsdk/txpow / templateFreshness

Function: templateFreshness()

templateFreshness(template, latest, options?): object

Default staleness policy: a template is "current enough" for admission if it was captured within the window, and "current" for L1 broadcast if it matches the latest template id.

Parameters

template

MinimaWorkTemplate

latest

MinimaWorkTemplate | null

options?

admissionWindowMs?

number

now?

number

Returns

object

admissionValid

admissionValid: boolean

broadcastable

broadcastable: boolean