Documentation
¶
Overview ¶
Package enginetest provides test utilities for consensus engines
Package enginetest provides test utilities for consensus engines
Index ¶
- type Sender
- func (s *Sender) SendAppError(ctx context.Context, nodeID ids.NodeID, requestID uint32, errorCode int32, ...) error
- func (s *Sender) SendAppGossip(ctx context.Context, config core.SendConfig, gossip []byte) error
- func (s *Sender) SendAppGossipSpecific(ctx context.Context, config core.SendConfig, gossip []byte) error
- func (s *Sender) SendAppRequest(ctx context.Context, nodeIDs set.Set[ids.NodeID], requestID uint32, ...) error
- func (s *Sender) SendAppResponse(ctx context.Context, nodeID ids.NodeID, requestID uint32, response []byte) error
- func (s *Sender) SendCrossChainAppError(ctx context.Context, chainID ids.ID, requestID uint32, errorCode int32, ...) error
- func (s *Sender) SendCrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, request []byte) error
- func (s *Sender) SendCrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, response []byte) error
- type TestEngine
- type VM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sender ¶ added in v1.19.13
type Sender struct {
SendAppRequestF func(context.Context, set.Set[ids.NodeID], uint32, []byte) error
SendAppResponseF func(context.Context, ids.NodeID, uint32, []byte) error
SendAppErrorF func(context.Context, ids.NodeID, uint32, int32, string) error
SendAppGossipF func(context.Context, core.SendConfig, []byte) error
SendAppGossipSpecificF func(context.Context, core.SendConfig, []byte) error
SendCrossChainAppRequestF func(context.Context, ids.ID, uint32, []byte) error
SendCrossChainAppResponseF func(context.Context, ids.ID, uint32, []byte) error
SendCrossChainAppErrorF func(context.Context, ids.ID, uint32, int32, string) error
}
Sender is a test implementation of core.Sender for testing
func (*Sender) SendAppError ¶ added in v1.19.13
func (*Sender) SendAppGossip ¶ added in v1.19.13
func (*Sender) SendAppGossipSpecific ¶ added in v1.19.13
func (*Sender) SendAppRequest ¶ added in v1.19.13
func (*Sender) SendAppResponse ¶ added in v1.19.13
func (*Sender) SendCrossChainAppError ¶ added in v1.19.13
func (*Sender) SendCrossChainAppRequest ¶ added in v1.19.13
type TestEngine ¶
type TestEngine struct {
// contains filtered or unexported fields
}
TestEngine provides a test implementation for consensus engines
func (*TestEngine) IsStarted ¶
func (t *TestEngine) IsStarted() bool
IsStarted returns whether the engine is started
func (*TestEngine) SetHeight ¶
func (t *TestEngine) SetHeight(height uint64)
SetHeight sets the engine height
Click to show internal directories.
Click to hide internal directories.