Versions in this module Expand all Collapse all v1 v1.12.2 Mar 3, 2025 Changes in this version + var ErrNotOracle = errors.New("block isn't an oracle") + type Block interface + Bytes func() []byte + Height func() uint64 + Parent func() ids.ID + Timestamp func() time.Time + Verify func(context.Context) error + type Consensus interface + Add func(Block) error + GetParent func(id ids.ID) (ids.ID, bool) + Initialize func(ctx *snow.ConsensusContext, params snowball.Parameters, lastAcceptedID ids.ID, ...) error + IsPreferred func(ids.ID) bool + LastAccepted func() (ids.ID, uint64) + NumProcessing func() int + Preference func() ids.ID + PreferenceAtHeight func(height uint64) (ids.ID, bool) + Processing func(ids.ID) bool + RecordPoll func(context.Context, bag.Bag[ids.ID]) error + func Trace(consensus Consensus, tracer trace.Tracer) Consensus + type Factory interface + New func() Consensus + type OracleBlock interface + Options func(context.Context) ([2]Block, error) + type Topological struct + Factory snowball.Factory + func (ts *Topological) Add(blk Block) error + func (ts *Topological) GetParent(id ids.ID) (ids.ID, bool) + func (ts *Topological) HealthCheck(context.Context) (interface{}, error) + func (ts *Topological) Initialize(ctx *snow.ConsensusContext, params snowball.Parameters, lastAcceptedID ids.ID, ...) error + func (ts *Topological) IsPreferred(blkID ids.ID) bool + func (ts *Topological) LastAccepted() (ids.ID, uint64) + func (ts *Topological) NumProcessing() int + func (ts *Topological) Preference() ids.ID + func (ts *Topological) PreferenceAtHeight(height uint64) (ids.ID, bool) + func (ts *Topological) Processing(blkID ids.ID) bool + func (ts *Topological) RecordPoll(ctx context.Context, voteBag bag.Bag[ids.ID]) error + type TopologicalFactory struct + func (tf TopologicalFactory) New() Consensus