ouroboros-consensus-0.18.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Storage.ChainDB.Impl.Follower

Description

Followers

Synopsis

Documentation

closeAllFollowersIOLike m ⇒ ChainDbEnv m blk → m () Source #

Close all open block and header Followers.

newFollower ∷ ∀ m blk b. (IOLike m, HasHeader blk, GetHeader blk, HasNestedContent Header blk, EncodeDiskDep (NestedCtxt Header) blk) ⇒ ChainDbHandle m blk → ResourceRegistry m → ChainTypeBlockComponent blk b → m (Follower m blk b) Source #

switchFork Source #

Arguments

∷ ∀ m blk b. HasHeader blk 
Point blk

Intersection point between the new and the old chain.

Set (Point blk)

Set of points that are in the old chain and not in 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.