Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidMsg = errors.New("invalid message") ErrNotReady = errors.New("not ready") ErrPeerNotFound = errors.New("peer message not found") ErrNotEnoughBKs = errors.New("not enough Birkhoff coefficient") ErrSelfBKNotFound = errors.New("self Birkhoff coefficient not found") ErrInvalidBK = errors.New("invalid Birkhoff coefficient") ErrInconsistentThreshold = errors.New("inconsistent threshold") ErrInconsistentPeerNumAndBks = errors.New("inconsistent peer num and bks") ErrInconsistentPubKey = errors.New("inconsistent public key") )
Functions ¶
func GetTestPeers ¶ added in v1.0.2
func GetTestPeersByArray ¶ added in v1.0.2
Types ¶
type TestPeerManager ¶ added in v1.0.2
type TestPeerManager struct {
// contains filtered or unexported fields
}
func NewTestPeerManager ¶ added in v1.0.2
func NewTestPeerManager(id int, lens int) *TestPeerManager
func NewTestPeerManagerWithPeers ¶ added in v1.0.2
func NewTestPeerManagerWithPeers(id int, peers []string) *TestPeerManager
func (*TestPeerManager) MustSend ¶ added in v1.0.2
func (p *TestPeerManager) MustSend(id string, message interface{})
Only send if the msg main exists
func (*TestPeerManager) NumPeers ¶ added in v1.0.2
func (p *TestPeerManager) NumPeers() uint32
func (*TestPeerManager) PeerIDs ¶ added in v1.0.2
func (p *TestPeerManager) PeerIDs() []string
func (*TestPeerManager) SelfID ¶ added in v1.0.2
func (p *TestPeerManager) SelfID() string
func (*TestPeerManager) Set ¶ added in v1.0.2
func (p *TestPeerManager) Set(msgMains map[string]types.MessageMain)
Click to show internal directories.
Click to hide internal directories.