Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A pretty-printer and tracer that shows the current peer simulator state in a block tree, highlighting the candidate fragments, selection, and forks in different colors, omitting uninteresting segments.
Synopsis
- data PeerSimState = PeerSimState {}
- data RenderConfig = RenderConfig {}
- defaultRenderConfig ∷ RenderConfig
- peerSimStateDiagram ∷ PeerSimState → String
- peerSimStateDiagramSTMTracer ∷ IOLike m ⇒ Tracer m String → BlockTree TestBlock → STM m (AnchoredFragment (Header TestBlock)) → STM m (Map PeerId (AnchoredFragment (Header TestBlock))) → STM m (Map PeerId (Maybe (NodeState TestBlock))) → m (Tracer m ())
- peerSimStateDiagramSTMTracerDebug ∷ IOLike m ⇒ BlockTree TestBlock → STM m (AnchoredFragment (Header TestBlock)) → STM m (Map PeerId (AnchoredFragment (Header TestBlock))) → STM m (Map PeerId (Maybe (NodeState TestBlock))) → m (Tracer m ())
- peerSimStateDiagramTracer ∷ Tracer m String → Tracer m PeerSimState
- peerSimStateDiagramWith ∷ RenderConfig → PeerSimState → (String, Map PeerId Word64)
Documentation
data PeerSimState Source #
All inputs for the state diagram printer.
data RenderConfig Source #
peerSimStateDiagramSTMTracer ∷ IOLike m ⇒ Tracer m String → BlockTree TestBlock → STM m (AnchoredFragment (Header TestBlock)) → STM m (Map PeerId (AnchoredFragment (Header TestBlock))) → STM m (Map PeerId (Maybe (NodeState TestBlock))) → m (Tracer m ()) Source #
Construct a stateful tracer that prints the current peer simulator state in a block tree, highlighting the candidate fragments, selection, and forks in different colors, omitting uninteresting segments.
Since the tracer gets its input from concurrent state, it takes only a dummy
()
value as its argument.
peerSimStateDiagramSTMTracerDebug ∷ IOLike m ⇒ BlockTree TestBlock → STM m (AnchoredFragment (Header TestBlock)) → STM m (Map PeerId (AnchoredFragment (Header TestBlock))) → STM m (Map PeerId (Maybe (NodeState TestBlock))) → m (Tracer m ()) Source #
Construct a stateful tracer that prints the current peer simulator state in a block tree, highlighting the candidate fragments, selection, and forks in different colors, omitting uninteresting segments.
Since the tracer gets its input from concurrent state, it takes only a dummy
()
value as its argument.
This variant uses the global debug tracer.
peerSimStateDiagramTracer ∷ Tracer m String → Tracer m PeerSimState Source #
Construct a tracer that prints the current peer simulator state in a block tree, highlighting the candidate fragments, selection, and forks in different colors, omitting uninteresting segments.
peerSimStateDiagramWith ∷ RenderConfig → PeerSimState → (String, Map PeerId Word64) Source #
Pretty-print the current peer simulator state in a block tree, highlighting the candidate fragments, selection, and forks in different colors, omitting uninteresting segments.