Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Storage.ChainDB.Impl.Follower
Description
Followers
Synopsis
- closeAllFollowers ∷ IOLike m ⇒ ChainDbEnv m blk → m ()
- newFollower ∷ (IOLike m, HasHeader blk, GetHeader blk, HasNestedContent Header blk, EncodeDiskDep (NestedCtxt Header) blk) ⇒ ChainDbHandle m blk → ResourceRegistry m → ChainType → BlockComponent blk b → m (Follower m blk b)
- switchFork ∷ ∀ (m ∷ Type → Type) blk b. GetHeader blk ⇒ AnchoredFragment (Header blk) → FollowerState m blk b → FollowerState m blk b
Documentation
closeAllFollowers ∷ IOLike m ⇒ ChainDbEnv m blk → m () Source #
Close all open block and header Follower
s.
newFollower ∷ (IOLike m, HasHeader blk, GetHeader blk, HasNestedContent Header blk, EncodeDiskDep (NestedCtxt Header) blk) ⇒ ChainDbHandle m blk → ResourceRegistry m → ChainType → BlockComponent blk b → m (Follower m blk b) Source #
Arguments
∷ ∀ (m ∷ Type → Type) blk b. GetHeader blk | |
⇒ AnchoredFragment (Header blk) | Suffix of the old chain anchored at the intersection with the new chain. |
→ FollowerState m blk b | |
→ FollowerState m blk b |
Switches the follower to the new fork, by checking whether the follower is following an old fork, and updating the follower state to rollback to the intersection point if it is.