Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Util.TentativeState
Synopsis
-
data
TentativeState
blk
- = LastInvalidTentative !( SelectView ( BlockProtocol blk))
- | NoLastInvalidTentative
- preferToLastInvalidTentative :: forall blk. LedgerSupportsProtocol blk => BlockConfig blk -> TentativeState blk -> Header blk -> Bool
Documentation
data TentativeState blk Source #
Tentative header state in the context of diffusion pipelining. This is used to check/enforce the monotonicity requirement on invalid tentative block bodies.
- During chain selection, we maintain the last invalid tentative header to ensure that the stream of tentative headers we sent downstream whose blocks turned out to be invalid are strictly improving.
- In the BlockFetch client, we use it to enforce this property for each upstream peer.
Constructors
LastInvalidTentative !( SelectView ( BlockProtocol blk)) | |
NoLastInvalidTentative |
Instances
preferToLastInvalidTentative :: forall blk. LedgerSupportsProtocol blk => BlockConfig blk -> TentativeState blk -> Header blk -> Bool Source #