Versions in this module Expand all Collapse all v0 v0.0.0 Jul 4, 2022 Changes in this version + func ChooseParents(existingParents hash.Events, options hash.Events, strategies []SearchStrategy) hash.Events + type DagIndex interface + type DiffMetricFn func(median, current, update idx.Event, validatorIdx idx.Validator) Metric + type Matrix struct + func NewMatrix(rows, cols idx.Validator) Matrix + func (m Matrix) Clone() Matrix + func (m Matrix) Row(i idx.Validator) []idx.Event + type Metric uint64 + type MetricCache struct + func NewMetricFnCache(metricFn func(hash.Event) Metric, cacheSize int) *MetricCache + func (c *MetricCache) GetMetricOf(id hash.Event) Metric + type MetricStrategy struct + func NewMetricStrategy(metricFn func(hash.Event) Metric) *MetricStrategy + func (st *MetricStrategy) Choose(_ hash.Events, options hash.Events) int + type PayloadIndexer struct + func NewPayloadIndexer(cacheSize int) *PayloadIndexer + func (h *PayloadIndexer) GetMetricOf(id hash.Event) Metric + func (h *PayloadIndexer) ProcessEvent(event dag.Event, payloadMetric Metric) + func (h *PayloadIndexer) SearchStrategy() SearchStrategy + type QuorumIndexer struct + func NewQuorumIndexer(validators *pos.Validators, dagi DagIndex, diffMetricFn DiffMetricFn) *QuorumIndexer + func (h *QuorumIndexer) GetGlobalMatrix() Matrix + func (h *QuorumIndexer) GetGlobalMedianSeqs() []idx.Event + func (h *QuorumIndexer) GetMetricOf(id hash.Event) Metric + func (h *QuorumIndexer) GetSelfParentSeqs() []idx.Event + func (h *QuorumIndexer) ProcessEvent(event dag.Event, selfEvent bool) + func (h *QuorumIndexer) SearchStrategy() SearchStrategy + type RandomStrategy struct + func NewRandomStrategy(r *rand.Rand) *RandomStrategy + func (st *RandomStrategy) Choose(_ hash.Events, options hash.Events) int + type SearchStrategy interface + Choose func(existingParents hash.Events, options hash.Events) int