testobjects

package
v0.0.0-...-ff61ee7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Objects shared by some tests.

Index

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 (*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 (*MockMainChannel) SendAlways

func (*MockMainChannel) SendHeader

func (*MockMainChannel) SendTo

func (*MockMainChannel) SendToPub

func (mmc *MockMainChannel) SendToPub(headers []messages.MsgHeader, _ sig.Pub, countStats bool,
	consStats stats.ConsNwStatsInterface) error

func (*MockMainChannel) SendToSelf

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL