Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GenOpt ¶
type GenOpt func(*Generator)
GenOpt for configuring Generator.
func WithLayerSize ¶
WithLayerSize configures average layer size.
type Generator ¶
type Generator struct { State State // contains filtered or unexported fields }
Generator for layers of blocks.
type NextOpt ¶
type NextOpt func(*nextConf)
NextOpt is for configuring layer generator.
func WithNextReorder ¶
WithNextReorder configures when reordered layer should be returned. Examples: Next() Next(WithNextReorder(1)) Next() 1 3 2 Next() Next(WithNextReorder(2)) Next() Next() 1 3 4 2
So the Next layer with WithNextReorder will be delayed exactly by `delay` value.
func WithVoteGenerator ¶
func WithVoteGenerator(gen VotesGenerator) NextOpt
WithVoteGenerator declares vote generator for a layer.
func WithoutInputVector ¶
func WithoutInputVector() NextOpt
WithoutInputVector will prevent from saving input vector.
type Sequence ¶
Sequence of layers with same configuration.
func WithSequence ¶
WithSequence creates Sequence object.
type SetupOpt ¶
type SetupOpt func(g *setupConf)
SetupOpt configures setup.
func WithSetupMinerRange ¶
WithSetupMinerRange number of miners will be selected between low and high values.
func WithSetupUnitsRange ¶
WithSetupUnitsRange adjusts units of the ATXs, which will directly affect block weight.
type State ¶
type State struct { MeshDB *mesh.DB AtxDB *activation.DB }
State is state that can be used by tortoise.
type VotesGenerator ¶
VotesGenerator allows to replace default votes generator. TODO(dshulyak) what is the best way to encapsulate all configuration that is required to generate votes?