| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.HardFork.History.EpochInfo
Description
Derive EpochInfo
Synopsis
- summaryToEpochInfo :: forall m xs. (MonadSTM m, MonadThrow (STM m)) => STM m (Summary xs) -> m (EpochInfo (STM m))
- snapshotEpochInfo :: forall xs. Summary xs -> EpochInfo Identity
- dummyEpochInfo :: EpochInfo Identity
Documentation
summaryToEpochInfo :: forall m xs. (MonadSTM m, MonadThrow (STM m)) => STM m (Summary xs) -> m (EpochInfo (STM m)) Source #
Construct EpochInfo from a function that returns the hard fork summary
When a particular request fails with a PastHorizon error, we ask for an
updated summary, in the hope that the ledger state has advanced. If the query
still fails with that updated summary, the error is thrown as an exception.
snapshotEpochInfo :: forall xs. Summary xs -> EpochInfo Identity Source #
Construct an EpochInfo for a snapshot of the ledger state
When a particular request fails with a PastHorizon error, we throw the
error as a pure exception. Such an exception would indicate a bug.