ouroboros-consensus:diffusion
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.NodeKernel.Forge

Description

Run one leadership check and, if we are leader, forge and adopt a block.

This is spawned once per forge-credentials thread by forkBlockForging.

Documentation

forge Source #

Arguments

∷ (IOLike m, RunNode blk) 
⇒ Tracer m (TraceLabelCreds (TraceForgeEvent blk)) 
→ Tracer m (TraceLabelCreds (ForgeStateInfo blk)) 
→ TopLevelConfig blk 
→ ChainDB m blk 
→ Mempool m blk 
→ BlockForging m blk 
→ (Header blk → EndorserBlock → m ())

forge calls this function after forgeBlock and before addBlockToChainDB. The arguments are the header of the forged ranking block and the endorser block that it announces.

→ SlotNo 
→ WithEarlyExit m ()