Documentation ¶
Overview ¶
Package blockmania implements the Blockmania consensus algorithm.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockGraph ¶
BlockGraph represents a block generated by a node and its dependencies.
type BlockID ¶
BlockID represents a specific block from a node in a way that can be used as a map key.
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph represents the graph that is generated from the nodes in a shard broadcasting to each other.
func New ¶
func New(ctx context.Context, cfg *Config, cb func(*Interpreted)) *Graph
New instantiates a Graph for use by the broadcast/consensus mechanism.
func (*Graph) Add ¶
func (graph *Graph) Add(data *BlockGraph)
Add updates the graph and notifies the appropriate controllers.
type Interpreted ¶
Interpreted represents the results of interpreting a Graph for a particular round.
Click to show internal directories.
Click to hide internal directories.