ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
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, HasHeader (Header blk)) 
Point blk

Intersection point between old and new chain

AnchoredFragment (Header blk)

The new chain

FollowerState m blk b 
FollowerState m blk b 

Update the given FollowerState to account for switching the current chain to the given fork (which might just be an extension of the current chain).

PRECONDITION: the intersection point must be within the fragment bounds of the new chain