Skip to content

Commit 63c131e

Browse files
Merge #2988
2988: network: add headerForgeUTCTime field to BlockFetchConsensusInterface r=nfrisby a=nfrisby Single commit PR. The message: ``` This field calculates the UTCTime at which the given header's corresponding block was forged. The `blockForgeUTCTime` is provided for convenience only: you could instead extract the header from the block and call `headerForgeUTCTime`. This field risks being extremely subtle footgun. Hence it has a rather severe PRECONDITION and WARNING in its Haddock. We also introduce the intentionally noisy `FromConsensus` newtype wrapper so that each call site must explicitly claim that the argument satisfies the precondition. This function is being currently provided in order to enable a _metric_. If it were to be used for something more crucial, such as peer selection (which via Ouroboros Genesis becomes directly relevant to the consensus algorithm!), we'd hesitate further. We're generally weary of spreading time-conversions too widely; we paid that price once when developing the HFC. Once bitten twice shy. ``` Co-authored-by: Nicolas Frisby <[email protected]>
2 parents 4558cbb + e2035a6 commit 63c131e

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)