Versions in this module Expand all Collapse all v1 v1.999.0 Nov 17, 2022 Changes in this version + type MessengerStub struct + AddPeerTopicNotifierCalled func(notifier p2p.PeerTopicNotifier) error + AddressesCalled func() []string + BootstrapCalled func() error + BroadcastCalled func(topic string, buff []byte) + BroadcastOnChannelBlockingCalled func(channel string, topic string, buff []byte) error + BroadcastOnChannelCalled func(channel string, topic string, buff []byte) + CloseCalled func() error + ConnectToPeerCalled func(address string) error + ConnectedAddressesCalled func() []string + ConnectedFullHistoryPeersOnTopicCalled func(topic string) []core.PeerID + ConnectedPeersCalled func() []core.PeerID + ConnectedPeersOnTopicCalled func(topic string) []core.PeerID + CreateTopicCalled func(name string, createChannelForTopic bool) error + GetConnectedPeersInfoCalled func() *p2p.ConnectedPeersInfo + HasTopicCalled func(name string) bool + HasTopicValidatorCalled func(name string) bool + IDCalled func() core.PeerID + IsConnectedCalled func(peerID core.PeerID) bool + IsConnectedToTheNetworkCalled func() bool + PeerAddressesCalled func(pid core.PeerID) []string + PeersCalled func() []core.PeerID + PortCalled func() int + RegisterMessageProcessorCalled func(topic string, identifier string, handler p2p.MessageProcessor) error + SendToConnectedPeerCalled func(topic string, buff []byte, peerID core.PeerID) error + SetPeerDenialEvaluatorCalled func(handler p2p.PeerDenialEvaluator) error + SetPeerShardResolverCalled func(peerShardResolver p2p.PeerShardResolver) error + SetThresholdMinConnectedPeersCalled func(minConnectedPeers int) error + SignCalled func(payload []byte) ([]byte, error) + ThresholdMinConnectedPeersCalled func() int + UnjoinAllTopicsCalled func() error + UnregisterAllMessageProcessorsCalled func() error + UnregisterMessageProcessorCalled func(topic string, identifier string) error + VerifyCalled func(payload []byte, pid core.PeerID, signature []byte) error + WaitForConnectionsCalled func(maxWaitingTime time.Duration, minNumOfPeers uint32) + func (ms *MessengerStub) AddPeerTopicNotifier(notifier p2p.PeerTopicNotifier) error + func (ms *MessengerStub) Addresses() []string + func (ms *MessengerStub) Bootstrap() error + func (ms *MessengerStub) Broadcast(topic string, buff []byte) + func (ms *MessengerStub) BroadcastOnChannel(channel string, topic string, buff []byte) + func (ms *MessengerStub) BroadcastOnChannelBlocking(channel string, topic string, buff []byte) error + func (ms *MessengerStub) Close() error + func (ms *MessengerStub) ConnectToPeer(address string) error + func (ms *MessengerStub) ConnectedAddresses() []string + func (ms *MessengerStub) ConnectedFullHistoryPeersOnTopic(topic string) []core.PeerID + func (ms *MessengerStub) ConnectedPeers() []core.PeerID + func (ms *MessengerStub) ConnectedPeersOnTopic(topic string) []core.PeerID + func (ms *MessengerStub) CreateTopic(name string, createChannelForTopic bool) error + func (ms *MessengerStub) GetConnectedPeersInfo() *p2p.ConnectedPeersInfo + func (ms *MessengerStub) HasTopic(name string) bool + func (ms *MessengerStub) HasTopicValidator(name string) bool + func (ms *MessengerStub) ID() core.PeerID + func (ms *MessengerStub) IsConnected(peerID core.PeerID) bool + func (ms *MessengerStub) IsConnectedToTheNetwork() bool + func (ms *MessengerStub) IsInterfaceNil() bool + func (ms *MessengerStub) PeerAddresses(pid core.PeerID) []string + func (ms *MessengerStub) Peers() []core.PeerID + func (ms *MessengerStub) Port() int + func (ms *MessengerStub) RegisterMessageProcessor(topic string, identifier string, handler p2p.MessageProcessor) error + func (ms *MessengerStub) SendToConnectedPeer(topic string, buff []byte, peerID core.PeerID) error + func (ms *MessengerStub) SetPeerDenialEvaluator(handler p2p.PeerDenialEvaluator) error + func (ms *MessengerStub) SetPeerShardResolver(peerShardResolver p2p.PeerShardResolver) error + func (ms *MessengerStub) SetThresholdMinConnectedPeers(minConnectedPeers int) error + func (ms *MessengerStub) Sign(payload []byte) ([]byte, error) + func (ms *MessengerStub) ThresholdMinConnectedPeers() int + func (ms *MessengerStub) UnjoinAllTopics() error + func (ms *MessengerStub) UnregisterAllMessageProcessors() error + func (ms *MessengerStub) UnregisterMessageProcessor(topic string, identifier string) error + func (ms *MessengerStub) Verify(payload []byte, pid core.PeerID, signature []byte) error + func (ms *MessengerStub) WaitForConnections(maxWaitingTime time.Duration, minNumOfPeers uint32) + type NetworkShardingCollectorStub struct + GetLastKnownPeerIDCalled func(pk []byte) (core.PeerID, bool) + GetPeerInfoCalled func(pid core.PeerID) core.P2PPeerInfo + PutPeerIdShardIdCalled func(pid core.PeerID, shardId uint32) + PutPeerIdSubTypeCalled func(pid core.PeerID, peerSubType core.P2PPeerSubType) + UpdatePeerIDInfoCalled func(pid core.PeerID, pk []byte, shardID uint32) + UpdatePeerIDPublicKeyPairCalled func(pid core.PeerID, pk []byte) + func (nscs *NetworkShardingCollectorStub) GetLastKnownPeerID(pk []byte) (core.PeerID, bool) + func (nscs *NetworkShardingCollectorStub) GetPeerInfo(pid core.PeerID) core.P2PPeerInfo + func (nscs *NetworkShardingCollectorStub) IsInterfaceNil() bool + func (nscs *NetworkShardingCollectorStub) PutPeerIdShardId(pid core.PeerID, shardID uint32) + func (nscs *NetworkShardingCollectorStub) PutPeerIdSubType(pid core.PeerID, peerSubType core.P2PPeerSubType) + func (nscs *NetworkShardingCollectorStub) UpdatePeerIDInfo(pid core.PeerID, pk []byte, shardID uint32) + func (nscs *NetworkShardingCollectorStub) UpdatePeerIDPublicKeyPair(pid core.PeerID, pk []byte) + type PeersHolderStub struct + ClearCalled func() + ContainsCalled func(peerID core.PeerID) bool + GetCalled func() map[uint32][]core.PeerID + PutConnectionAddressCalled func(peerID core.PeerID, address string) + PutShardIDCalled func(peerID core.PeerID, shardID uint32) + RemoveCalled func(peerID core.PeerID) + func (p *PeersHolderStub) Clear() + func (p *PeersHolderStub) Contains(peerID core.PeerID) bool + func (p *PeersHolderStub) Get() map[uint32][]core.PeerID + func (p *PeersHolderStub) IsInterfaceNil() bool + func (p *PeersHolderStub) PutConnectionAddress(peerID core.PeerID, address string) + func (p *PeersHolderStub) PutShardID(peerID core.PeerID, shardID uint32) + func (p *PeersHolderStub) Remove(peerID core.PeerID) + type PeersRatingHandlerStub struct + AddPeerCalled func(pid core.PeerID) + DecreaseRatingCalled func(pid core.PeerID) + GetTopRatedPeersFromListCalled func(peers []core.PeerID, numOfPeers int) []core.PeerID + IncreaseRatingCalled func(pid core.PeerID) + func (stub *PeersRatingHandlerStub) AddPeer(pid core.PeerID) + func (stub *PeersRatingHandlerStub) DecreaseRating(pid core.PeerID) + func (stub *PeersRatingHandlerStub) GetTopRatedPeersFromList(peers []core.PeerID, numOfPeers int) []core.PeerID + func (stub *PeersRatingHandlerStub) IncreaseRating(pid core.PeerID) + func (stub *PeersRatingHandlerStub) IsInterfaceNil() bool