Documentation ¶
Index ¶
- type Config
- type Engine
- type EngineTest
- type Transitive
- func (t *Transitive) AppGossip(nodeID ids.ShortID, msg []byte) error
- func (t *Transitive) AppRequest(nodeID ids.ShortID, requestID uint32, deadline time.Time, request []byte) error
- func (t *Transitive) AppRequestFailed(nodeID ids.ShortID, requestID uint32) error
- func (t *Transitive) AppResponse(nodeID ids.ShortID, requestID uint32, response []byte) error
- func (t *Transitive) Chits(vdr ids.ShortID, requestID uint32, votes []ids.ID) error
- func (t *Transitive) Connected(nodeID ids.ShortID, nodeVersion version.Application) error
- func (t *Transitive) Context() *snow.ConsensusContext
- func (t *Transitive) Disconnected(nodeID ids.ShortID) error
- func (t *Transitive) GetFailed(vdr ids.ShortID, requestID uint32) error
- func (t *Transitive) GetVM() common.VM
- func (t *Transitive) GetVtx(vtxID ids.ID) (avalanche.Vertex, error)
- func (t *Transitive) Gossip() error
- func (t *Transitive) Halt()
- func (t *Transitive) HealthCheck() (interface{}, error)
- func (m *Transitive) Initialize(namespace string, reg prometheus.Registerer) error
- func (t *Transitive) Notify(msg common.Message) error
- func (t *Transitive) PullQuery(vdr ids.ShortID, requestID uint32, vtxID ids.ID) error
- func (t *Transitive) PushQuery(vdr ids.ShortID, requestID uint32, vtxBytes []byte) error
- func (t *Transitive) Put(vdr ids.ShortID, requestID uint32, vtxBytes []byte) error
- func (t *Transitive) QueryFailed(vdr ids.ShortID, requestID uint32) error
- func (t *Transitive) Shutdown() error
- func (t *Transitive) Start(startReqID uint32) error
- func (t *Transitive) Timeout() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Ctx *snow.ConsensusContext common.AllGetsServer VM vertex.DAGVM Manager vertex.Manager Sender common.Sender Validators validators.Set Params avalanche.Parameters Consensus avalanche.Consensus }
Config wraps all the parameters needed for an avalanche engine
type Engine ¶
type Engine interface { common.Engine // GetVtx returns a vertex by its ID. // Returns an error if unknown. GetVtx(vtxID ids.ID) (avalanche.Vertex, error) }
Engine describes the events that can occur on a consensus instance
type EngineTest ¶ added in v1.7.6
type EngineTest struct { common.EngineTest CantGetVtx bool GetVtxF func(vtxID ids.ID) (avalanche.Vertex, error) }
EngineTest is a test engine
func (*EngineTest) Default ¶ added in v1.7.6
func (e *EngineTest) Default(cant bool)
type Transitive ¶
type Transitive struct { Config // list of NoOpsHandler for messages dropped by engine common.AcceptedFrontierHandler common.AcceptedHandler common.AncestorsHandler RequestID uint32 // contains filtered or unexported fields }
Transitive implements the Engine interface by attempting to fetch all transitive dependencies.
func (*Transitive) AppGossip ¶ added in v1.7.6
func (t *Transitive) AppGossip(nodeID ids.ShortID, msg []byte) error
AppGossip implements the AppHandler interface
func (*Transitive) AppRequest ¶ added in v1.7.6
func (t *Transitive) AppRequest(nodeID ids.ShortID, requestID uint32, deadline time.Time, request []byte) error
AppRequest implements the AppHandler interface
func (*Transitive) AppRequestFailed ¶ added in v1.7.6
func (t *Transitive) AppRequestFailed(nodeID ids.ShortID, requestID uint32) error
AppRequestFailed implements the AppHandler interface
func (*Transitive) AppResponse ¶ added in v1.7.6
AppResponse implements the AppHandler interface
func (*Transitive) Connected ¶ added in v1.7.6
func (t *Transitive) Connected(nodeID ids.ShortID, nodeVersion version.Application) error
Connected implements the InternalHandler interface.
func (*Transitive) Context ¶
func (t *Transitive) Context() *snow.ConsensusContext
Context implements the common.Engine interface.
func (*Transitive) Disconnected ¶ added in v1.7.6
func (t *Transitive) Disconnected(nodeID ids.ShortID) error
Disconnected implements the InternalHandler interface.
func (*Transitive) GetFailed ¶
func (t *Transitive) GetFailed(vdr ids.ShortID, requestID uint32) error
GetFailed implements the PutHandler interface
func (*Transitive) GetVM ¶ added in v1.7.6
func (t *Transitive) GetVM() common.VM
GetVM implements the common.Engine interface.
func (*Transitive) Gossip ¶ added in v1.7.6
func (t *Transitive) Gossip() error
Gossip implements the InternalHandler interface
func (*Transitive) Halt ¶ added in v1.7.6
func (t *Transitive) Halt()
Halt implements the InternalHandler interface
func (*Transitive) HealthCheck ¶ added in v1.7.6
func (t *Transitive) HealthCheck() (interface{}, error)
HealthCheck implements the common.Engine interface.
func (*Transitive) Initialize ¶
func (m *Transitive) Initialize(namespace string, reg prometheus.Registerer) error
Initialize implements the Engine interface
func (*Transitive) Notify ¶
func (t *Transitive) Notify(msg common.Message) error
Notify implements the InternalHandler interface
func (*Transitive) QueryFailed ¶
func (t *Transitive) QueryFailed(vdr ids.ShortID, requestID uint32) error
QueryFailed implements the ChitsHandler interface
func (*Transitive) Shutdown ¶
func (t *Transitive) Shutdown() error
Shutdown implements the InternalHandler interface
func (*Transitive) Start ¶ added in v1.7.6
func (t *Transitive) Start(startReqID uint32) error
Start implements the common.Engine interface.
func (*Transitive) Timeout ¶ added in v1.7.6
func (t *Transitive) Timeout() error
Timeout implements the InternalHandler interface