Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlockDAG ¶
BlockDAG is a causally ordered DAG that forms the central data structure of the IOTA protocol.
func New ¶
func New(logger log.Logger, workers *workerpool.Group, unsolidCommitmentBufferSize int, evictionState *eviction.State, blockCache *blocks.Blocks, errorHandler func(error), opts ...options.Option[BlockDAG]) (newBlockDAG *BlockDAG)
New is the constructor for the BlockDAG and creates a new BlockDAG instance.
func (*BlockDAG) Attach ¶
Attach is used to attach new Blocks to the BlockDAG. It is the main function of the BlockDAG that triggers Events.
func (*BlockDAG) GetOrRequestBlock ¶
GetOrRequestBlock returns the Block with the given BlockID from the BlockDAG (and requests it from the network if it is missing). If the requested Block is below the eviction threshold, then this method will return a nil block without creating it.
Click to show internal directories.
Click to hide internal directories.