Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.HardFork.Combinator.Protocol.ChainSel
Description
Infrastructure for doing chain selection across eras
Synopsis
- data AcrossEraMode (cfg ∷ Type → Type) a where
- data AcrossEraTiebreaker a b where
- NoTiebreakerAcrossEras ∷ ∀ a b. AcrossEraTiebreaker a b
- SameTiebreakerAcrossEras ∷ ∀ a b. TiebreakerView (BlockProtocol a) ~ TiebreakerView (BlockProtocol b) ⇒ AcrossEraTiebreaker a b
- acrossEraSelection ∷ ∀ (xs ∷ [Type]) (cfg ∷ Type → Type) a. All SingleEraBlock xs ⇒ AcrossEraMode cfg a → NP cfg xs → Tails AcrossEraTiebreaker xs → NS WrapTiebreakerView xs → NS WrapTiebreakerView xs → a
Documentation
data AcrossEraMode (cfg ∷ Type → Type) a where Source #
GADT indicating whether we are lifting compare
or preferCandidate
to
the HFC, together with the type of configuration we need for that and the
result type.
Constructors
AcrossEraCompare ∷ AcrossEraMode (Proxy ∷ Type → Type) Ordering | |
AcrossEraPreferCandidate ∷ AcrossEraMode WrapChainOrderConfig Bool |
data AcrossEraTiebreaker a b where Source #
How to compare chains of equal length across eras.
Constructors
NoTiebreakerAcrossEras ∷ ∀ a b. AcrossEraTiebreaker a b | No preference. |
SameTiebreakerAcrossEras ∷ ∀ a b. TiebreakerView (BlockProtocol a) ~ TiebreakerView (BlockProtocol b) ⇒ AcrossEraTiebreaker a b | Two eras using the same We use the |
acrossEraSelection ∷ ∀ (xs ∷ [Type]) (cfg ∷ Type → Type) a. All SingleEraBlock xs ⇒ AcrossEraMode cfg a → NP cfg xs → Tails AcrossEraTiebreaker xs → NS WrapTiebreakerView xs → NS WrapTiebreakerView xs → a Source #