Documentation
¶
Overview ¶
Package enginetest provides test utilities for consensus engines
Package enginetest provides test utilities for consensus engines
Index ¶
- type Sender
- func (s *Sender) SendCrossChainError(ctx context.Context, chainID ids.ID, requestID uint32, errorCode int32, ...) error
- func (s *Sender) SendCrossChainRequest(ctx context.Context, chainID ids.ID, requestID uint32, request []byte) error
- func (s *Sender) SendCrossChainResponse(ctx context.Context, chainID ids.ID, requestID uint32, response []byte) error
- func (s *Sender) SendError(ctx context.Context, nodeID ids.NodeID, requestID uint32, errorCode int32, ...) error
- func (s *Sender) SendGossip(ctx context.Context, config warp.SendConfig, gossip []byte) error
- func (s *Sender) SendRequest(ctx context.Context, nodeIDs set.Set[ids.NodeID], requestID uint32, ...) error
- func (s *Sender) SendResponse(ctx context.Context, nodeID ids.NodeID, 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 {
SendRequestF func(context.Context, set.Set[ids.NodeID], uint32, []byte) error
SendResponseF func(context.Context, ids.NodeID, uint32, []byte) error
SendErrorF func(context.Context, ids.NodeID, uint32, int32, string) error
SendGossipF func(context.Context, warp.SendConfig, []byte) error
SendCrossChainRequestF func(context.Context, ids.ID, uint32, []byte) error
SendCrossChainResponseF func(context.Context, ids.ID, uint32, []byte) error
SendCrossChainErrorF func(context.Context, ids.ID, uint32, int32, string) error
}
Sender is a test implementation of warp.Sender for testing
func (*Sender) SendCrossChainError ¶ added in v1.22.14
func (*Sender) SendCrossChainRequest ¶ added in v1.22.14
func (*Sender) SendCrossChainResponse ¶ added in v1.22.14
func (*Sender) SendGossip ¶ added in v1.22.14
func (*Sender) SendRequest ¶ added in v1.22.14
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.