-
Notifications
You must be signed in to change notification settings - Fork 22
Commit 63c131e
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]>File tree
Expand file treeCollapse file tree
0 file changed
+0
-0
lines changedFilter options
Expand file treeCollapse file tree
0 file changed
+0
-0
lines changed
0 commit comments