Documentation ¶
Index ¶
- type MockNet
- func (m *MockNet) AddTransaction(ctx context.Context, tx *types.TransactionOrder) ([]byte, error)
- func (m *MockNet) ForwardTransactions(ctx context.Context, receiver peer.ID)
- func (m *MockNet) ProcessTransactions(ctx context.Context, txProcessor network.TxProcessor)
- func (m *MockNet) Receive(msg any)
- func (m *MockNet) ReceivedChannel() <-chan any
- func (m *MockNet) ResetSentMessages(protocol string)
- func (m *MockNet) Send(ctx context.Context, msg any, receivers ...peer.ID) error
- func (m *MockNet) SentMessages(protocol string) []PeerMessage
- func (m *MockNet) SetErrorState(err error)
- type PeerMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockNet ¶
type MockNet struct { MessageCh chan any // contains filtered or unexported fields }
func NewMockNetwork ¶
func NewRootMockNetwork ¶ added in v0.3.0
func NewRootMockNetwork() *MockNet
func (*MockNet) AddTransaction ¶ added in v0.3.0
func (*MockNet) ForwardTransactions ¶ added in v0.3.0
func (*MockNet) ProcessTransactions ¶ added in v0.3.0
func (m *MockNet) ProcessTransactions(ctx context.Context, txProcessor network.TxProcessor)
func (*MockNet) ReceivedChannel ¶
func (*MockNet) ResetSentMessages ¶
func (*MockNet) SentMessages ¶
func (m *MockNet) SentMessages(protocol string) []PeerMessage
func (*MockNet) SetErrorState ¶ added in v0.2.0
type PeerMessage ¶
Click to show internal directories.
Click to hide internal directories.