Documentation ¶
Overview ¶
Objects shared by some tests.
Index ¶
- func CheckAuxMessage(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, ...)
- func CheckBVMessage(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, ...)
- func CheckCoinMessage(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, ...)
- func CheckCoinMessage2(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, ...)
- func CheckCommitMessage(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, ...)
- func CheckEchoMessage(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, ...)
- func CheckInitMessage(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, ...)
- func CheckInitSupportMessage(mmc *MockMainChannel, index types.ConsensusInt, ...)
- func CheckNoSend(mmc *MockMainChannel, t *testing.T)
- type MockMainChannel
- func (mmc *MockMainChannel) AddExternalNode(_ channelinterface.NetNodeInfo)
- func (mmc *MockMainChannel) ClearMessages()
- func (mmc *MockMainChannel) ClearMsgHeaders()
- func (mmc *MockMainChannel) ClearSelfMessages()
- func (mmc *MockMainChannel) Close()
- func (mmc *MockMainChannel) ComputeDestinations(_ channelinterface.NewForwardFuncFilter) []channelinterface.SendChannel
- func (mmc *MockMainChannel) CreateSendConnection(channelinterface.NetNodeInfo) error
- func (mmc *MockMainChannel) EndInit()
- func (mmc *MockMainChannel) GetBehaviorTracker() channelinterface.BehaviorTracker
- func (mmc *MockMainChannel) GetFirstHeader() messages.MsgHeader
- func (mmc *MockMainChannel) GetLocalNodeConnectionInfo() channelinterface.NetNodeInfo
- func (mmc *MockMainChannel) GetMessages() [][]byte
- func (mmc *MockMainChannel) GetMsgs() [][]byte
- func (mmc *MockMainChannel) GetProposals() []*deserialized.DeserializedItem
- func (mmc *MockMainChannel) GetSelfMessages() []*deserialized.DeserializedItem
- func (mmc *MockMainChannel) GetStats() stats.NwStatsInterface
- func (mmc *MockMainChannel) GotRcvConnection(*channelinterface.SendRecvChannel)
- func (mmc *MockMainChannel) HasProposal(p *deserialized.DeserializedItem)
- func (mmc *MockMainChannel) InitInProgress() bool
- func (mmc *MockMainChannel) MakeConnections([]sig.Pub) (errs []error)
- func (mmc *MockMainChannel) MakeConnectionsCloseOthers([]sig.Pub) (errs []error)
- func (mmc *MockMainChannel) Recv() (*channelinterface.RcvMsg, error)
- func (mmc *MockMainChannel) RemoveConnections([]sig.Pub) (errs []error)
- func (mmc *MockMainChannel) RemoveExternalNode(_ channelinterface.NetNodeInfo)
- func (mmc *MockMainChannel) ReprocessMessage(*channelinterface.RcvMsg)
- func (mmc *MockMainChannel) ReprocessMessageBytes(msg []byte)
- func (mmc *MockMainChannel) Send(buff []byte, _, toSelf bool, _ channelinterface.NewForwardFuncFilter, _ bool, ...)
- func (mmc *MockMainChannel) SendAlways(buff []byte, toSelf bool, _ channelinterface.NewForwardFuncFilter, _ bool, ...)
- func (mmc *MockMainChannel) SendHeader(headers []messages.MsgHeader, _, _ bool, ...)
- func (mmc *MockMainChannel) SendTo(_ []byte, _ channelinterface.SendChannel, _ bool, _ stats.ConsNwStatsInterface)
- func (mmc *MockMainChannel) SendToPub(headers []messages.MsgHeader, _ sig.Pub, countStats bool, ...) error
- func (mmc *MockMainChannel) SendToSelf(deser []*deserialized.DeserializedItem, timeout time.Duration) channelinterface.TimerInterface
- func (mmc *MockMainChannel) SetStaticNodeList(map[sig.PubKeyStr]channelinterface.NetNodeInfo)
- func (mmc *MockMainChannel) StartInit()
- func (mmc *MockMainChannel) StartMsgProcessThreads()
- func (mmc *MockMainChannel) WaitUntilAtLeastSendCons(int) error
- type MockSignMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAuxMessage ¶
func CheckAuxMessage(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, binVal types.BinVal, t *testing.T)
func CheckBVMessage ¶
func CheckBVMessage(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, binVal types.BinVal, t *testing.T)
func CheckCoinMessage ¶
func CheckCoinMessage(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, t *testing.T)
func CheckCoinMessage2 ¶
func CheckCoinMessage2(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, t *testing.T)
func CheckCommitMessage ¶
func CheckCommitMessage(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, hash types.HashBytes, t *testing.T)
func CheckEchoMessage ¶
func CheckEchoMessage(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, hash types.HashBytes, t *testing.T)
func CheckInitMessage ¶
func CheckInitMessage(mmc *MockMainChannel, index types.ConsensusInt, round types.ConsensusRound, proposal []byte, t *testing.T)
func CheckInitSupportMessage ¶
func CheckInitSupportMessage(mmc *MockMainChannel, index types.ConsensusInt, supportedIndex types.ConsensusInt, supportHash types.HashBytes, proposal []byte, t *testing.T)
func CheckNoSend ¶
func CheckNoSend(mmc *MockMainChannel, t *testing.T)
Types ¶
type MockMainChannel ¶
type MockMainChannel struct {
// contains filtered or unexported fields
}
func (*MockMainChannel) AddExternalNode ¶
func (mmc *MockMainChannel) AddExternalNode(_ channelinterface.NetNodeInfo)
func (*MockMainChannel) ClearMessages ¶
func (mmc *MockMainChannel) ClearMessages()
func (*MockMainChannel) ClearMsgHeaders ¶
func (mmc *MockMainChannel) ClearMsgHeaders()
func (*MockMainChannel) ClearSelfMessages ¶
func (mmc *MockMainChannel) ClearSelfMessages()
func (*MockMainChannel) Close ¶
func (mmc *MockMainChannel) Close()
func (*MockMainChannel) ComputeDestinations ¶
func (mmc *MockMainChannel) ComputeDestinations(_ channelinterface.NewForwardFuncFilter) []channelinterface.SendChannel
func (*MockMainChannel) CreateSendConnection ¶
func (mmc *MockMainChannel) CreateSendConnection(channelinterface.NetNodeInfo) error
func (*MockMainChannel) EndInit ¶
func (mmc *MockMainChannel) EndInit()
func (*MockMainChannel) GetBehaviorTracker ¶
func (mmc *MockMainChannel) GetBehaviorTracker() channelinterface.BehaviorTracker
func (*MockMainChannel) GetFirstHeader ¶
func (mmc *MockMainChannel) GetFirstHeader() messages.MsgHeader
func (*MockMainChannel) GetLocalNodeConnectionInfo ¶
func (mmc *MockMainChannel) GetLocalNodeConnectionInfo() channelinterface.NetNodeInfo
func (*MockMainChannel) GetMessages ¶
func (mmc *MockMainChannel) GetMessages() [][]byte
func (*MockMainChannel) GetMsgs ¶
func (mmc *MockMainChannel) GetMsgs() [][]byte
func (*MockMainChannel) GetProposals ¶
func (mmc *MockMainChannel) GetProposals() []*deserialized.DeserializedItem
func (*MockMainChannel) GetSelfMessages ¶
func (mmc *MockMainChannel) GetSelfMessages() []*deserialized.DeserializedItem
func (*MockMainChannel) GetStats ¶
func (mmc *MockMainChannel) GetStats() stats.NwStatsInterface
func (*MockMainChannel) GotRcvConnection ¶
func (mmc *MockMainChannel) GotRcvConnection(*channelinterface.SendRecvChannel)
func (*MockMainChannel) HasProposal ¶
func (mmc *MockMainChannel) HasProposal(p *deserialized.DeserializedItem)
func (*MockMainChannel) InitInProgress ¶
func (mmc *MockMainChannel) InitInProgress() bool
func (*MockMainChannel) MakeConnections ¶
func (mmc *MockMainChannel) MakeConnections([]sig.Pub) (errs []error)
func (*MockMainChannel) MakeConnectionsCloseOthers ¶
func (mmc *MockMainChannel) MakeConnectionsCloseOthers([]sig.Pub) (errs []error)
func (*MockMainChannel) Recv ¶
func (mmc *MockMainChannel) Recv() (*channelinterface.RcvMsg, error)
func (*MockMainChannel) RemoveConnections ¶
func (mmc *MockMainChannel) RemoveConnections([]sig.Pub) (errs []error)
func (*MockMainChannel) RemoveExternalNode ¶
func (mmc *MockMainChannel) RemoveExternalNode(_ channelinterface.NetNodeInfo)
func (*MockMainChannel) ReprocessMessage ¶
func (mmc *MockMainChannel) ReprocessMessage(*channelinterface.RcvMsg)
func (*MockMainChannel) ReprocessMessageBytes ¶
func (mmc *MockMainChannel) ReprocessMessageBytes(msg []byte)
func (*MockMainChannel) Send ¶
func (mmc *MockMainChannel) Send(buff []byte, _, toSelf bool, _ channelinterface.NewForwardFuncFilter, _ bool, _ stats.ConsNwStatsInterface)
func (*MockMainChannel) SendAlways ¶
func (mmc *MockMainChannel) SendAlways(buff []byte, toSelf bool, _ channelinterface.NewForwardFuncFilter, _ bool, _ stats.ConsNwStatsInterface)
func (*MockMainChannel) SendHeader ¶
func (mmc *MockMainChannel) SendHeader(headers []messages.MsgHeader, _, _ bool, _ channelinterface.NewForwardFuncFilter, _ bool, _ stats.ConsNwStatsInterface)
func (*MockMainChannel) SendTo ¶
func (mmc *MockMainChannel) SendTo(_ []byte, _ channelinterface.SendChannel, _ bool, _ stats.ConsNwStatsInterface)
func (*MockMainChannel) SendToPub ¶
func (mmc *MockMainChannel) SendToPub(headers []messages.MsgHeader, _ sig.Pub, countStats bool, consStats stats.ConsNwStatsInterface) error
func (*MockMainChannel) SendToSelf ¶
func (mmc *MockMainChannel) SendToSelf(deser []*deserialized.DeserializedItem, timeout time.Duration) channelinterface.TimerInterface
func (*MockMainChannel) SetStaticNodeList ¶
func (mmc *MockMainChannel) SetStaticNodeList(map[sig.PubKeyStr]channelinterface.NetNodeInfo)
func (*MockMainChannel) StartInit ¶
func (mmc *MockMainChannel) StartInit()
func (*MockMainChannel) StartMsgProcessThreads ¶
func (mmc *MockMainChannel) StartMsgProcessThreads()
func (*MockMainChannel) WaitUntilAtLeastSendCons ¶
func (mmc *MockMainChannel) WaitUntilAtLeastSendCons(int) error
type MockSignMsg ¶
type MockSignMsg []byte
func (MockSignMsg) GetSignedHash ¶
func (mc MockSignMsg) GetSignedHash() types.HashBytes
func (MockSignMsg) GetSignedMessage ¶
func (mc MockSignMsg) GetSignedMessage() []byte
Click to show internal directories.
Click to hide internal directories.