Versions in this module Expand all Collapse all v0 v0.0.4 Jan 15, 2025 v0.0.1 Jan 15, 2025 Changes in this version + type FakeP2P struct + func NewFuzzTestP2P() *FakeP2P + func (_ *FakeP2P) AddConnectionHandler(_, _ func(ctx context.Context, id peer.ID) error) + func (_ *FakeP2P) AddDisconnectionHandler(_ func(ctx context.Context, id peer.ID) error) + func (_ *FakeP2P) AddPingMethod(_ func(ctx context.Context, id peer.ID) error) + func (_ *FakeP2P) Broadcast(_ context.Context, _ proto.Message) error + func (_ *FakeP2P) BroadcastAttestation(_ context.Context, _ uint64, _ *ethpb.Attestation) error + func (_ *FakeP2P) BroadcastBlob(_ context.Context, _ uint64, _ *ethpb.SignedBlobSidecar) error + func (_ *FakeP2P) BroadcastSyncCommitteeMessage(_ context.Context, _ uint64, _ *ethpb.SyncCommitteeMessage) error + func (_ *FakeP2P) Disconnect(_ peer.ID) error + func (_ *FakeP2P) DiscoveryAddresses() ([]multiaddr.Multiaddr, error) + func (_ *FakeP2P) ENR() *enr.Record + func (_ *FakeP2P) Encoding() encoder.NetworkEncoding + func (_ *FakeP2P) FindPeersWithSubnet(_ context.Context, _ string, _ uint64, _ int) (bool, error) + func (_ *FakeP2P) Host() host.Host + func (_ *FakeP2P) InterceptAccept(_ network.ConnMultiaddrs) (allow bool) + func (_ *FakeP2P) InterceptAddrDial(peer.ID, multiaddr.Multiaddr) (allow bool) + func (_ *FakeP2P) InterceptPeerDial(peer.ID) (allow bool) + func (_ *FakeP2P) InterceptSecured(network.Direction, peer.ID, network.ConnMultiaddrs) (allow bool) + func (_ *FakeP2P) InterceptUpgraded(network.Conn) (allow bool, reason control.DisconnectReason) + func (_ *FakeP2P) JoinTopic(_ string, _ ...pubsub.TopicOpt) (*pubsub.Topic, error) + func (_ *FakeP2P) LeaveTopic(_ string) error + func (_ *FakeP2P) Metadata() metadata.Metadata + func (_ *FakeP2P) MetadataSeq() uint64 + func (_ *FakeP2P) PeerID() peer.ID + func (_ *FakeP2P) Peers() *peers.Status + func (_ *FakeP2P) PubSub() *pubsub.PubSub + func (_ *FakeP2P) PublishToTopic(_ context.Context, _ string, _ []byte, _ ...pubsub.PubOpt) error + func (_ *FakeP2P) RefreshENR() + func (_ *FakeP2P) Send(_ context.Context, _ interface{}, _ string, _ peer.ID) (network.Stream, error) + func (_ *FakeP2P) SetStreamHandler(_ string, _ network.StreamHandler) + func (_ *FakeP2P) SubscribeToTopic(_ string, _ ...pubsub.SubOpt) (*pubsub.Subscription, error) + type MockBroadcaster struct + BroadcastAttestations []*ethpb.Attestation + BroadcastCalled bool + BroadcastMessages []proto.Message + func (m *MockBroadcaster) Broadcast(_ context.Context, msg proto.Message) error + func (m *MockBroadcaster) BroadcastAttestation(_ context.Context, _ uint64, a *ethpb.Attestation) error + func (m *MockBroadcaster) BroadcastBlob(context.Context, uint64, *ethpb.SignedBlobSidecar) error + func (m *MockBroadcaster) BroadcastSyncCommitteeMessage(_ context.Context, _ uint64, _ *ethpb.SyncCommitteeMessage) error + type MockHost struct + Addresses []ma.Multiaddr + func (_ *MockHost) Close() error + func (_ *MockHost) ConnManager() connmgr.ConnManager + func (_ *MockHost) Connect(_ context.Context, _ peer.AddrInfo) error + func (_ *MockHost) EventBus() event.Bus + func (_ *MockHost) ID() peer.ID + func (_ *MockHost) Mux() protocol.Switch + func (_ *MockHost) Network() network.Network + func (_ *MockHost) NewStream(_ context.Context, _ peer.ID, _ ...protocol.ID) (network.Stream, error) + func (_ *MockHost) Peerstore() peerstore.Peerstore + func (_ *MockHost) RemoveStreamHandler(_ protocol.ID) + func (_ *MockHost) SetStreamHandler(_ protocol.ID, _ network.StreamHandler) + func (_ *MockHost) SetStreamHandlerMatch(protocol.ID, func(id protocol.ID) bool, network.StreamHandler) + func (m *MockHost) Addrs() []ma.Multiaddr + type MockMetadataProvider struct + Data metadata.Metadata + func (m *MockMetadataProvider) Metadata() metadata.Metadata + func (m *MockMetadataProvider) MetadataSeq() uint64 + type MockPeerManager struct + BHost host.Host + DiscoveryAddr []multiaddr.Multiaddr + Enr *enr.Record + FailDiscoveryAddr bool + PID peer.ID + func (_ *MockPeerManager) Disconnect(peer.ID) error + func (_ MockPeerManager) AddPingMethod(_ func(ctx context.Context, id peer.ID) error) + func (_ MockPeerManager) FindPeersWithSubnet(_ context.Context, _ string, _ uint64, _ int) (bool, error) + func (_ MockPeerManager) RefreshENR() + func (m *MockPeerManager) Host() host.Host + func (m *MockPeerManager) PeerID() peer.ID + func (m MockPeerManager) DiscoveryAddresses() ([]multiaddr.Multiaddr, error) + func (m MockPeerManager) ENR() *enr.Record + type MockPeersProvider struct + func (m *MockPeersProvider) ClearPeers() + func (m *MockPeersProvider) Peers() *peers.Status + type TestP2P struct + BHost host.Host + BroadcastCalled bool + DelaySend bool + Digest [4]byte + LocalMetadata metadata.Metadata + func NewTestP2P(t *testing.T) *TestP2P + func (_ *TestP2P) AddPingMethod(_ func(ctx context.Context, id peer.ID) error) + func (_ *TestP2P) DiscoveryAddresses() ([]multiaddr.Multiaddr, error) + func (_ *TestP2P) ENR() *enr.Record + func (_ *TestP2P) Encoding() encoder.NetworkEncoding + func (_ *TestP2P) FindPeersWithSubnet(_ context.Context, _ string, _ uint64, _ int) (bool, error) + func (_ *TestP2P) InterceptAccept(_ network.ConnMultiaddrs) (allow bool) + func (_ *TestP2P) InterceptAddrDial(peer.ID, multiaddr.Multiaddr) (allow bool) + func (_ *TestP2P) InterceptPeerDial(peer.ID) (allow bool) + func (_ *TestP2P) InterceptSecured(network.Direction, peer.ID, network.ConnMultiaddrs) (allow bool) + func (_ *TestP2P) InterceptUpgraded(network.Conn) (allow bool, reason control.DisconnectReason) + func (_ *TestP2P) RefreshENR() + func (_ *TestP2P) Started() bool + func (p *TestP2P) AddConnectionHandler(f, _ func(ctx context.Context, id peer.ID) error) + func (p *TestP2P) AddDisconnectionHandler(f func(ctx context.Context, id peer.ID) error) + func (p *TestP2P) Broadcast(_ context.Context, _ proto.Message) error + func (p *TestP2P) BroadcastAttestation(_ context.Context, _ uint64, _ *ethpb.Attestation) error + func (p *TestP2P) BroadcastBlob(context.Context, uint64, *ethpb.SignedBlobSidecar) error + func (p *TestP2P) BroadcastSyncCommitteeMessage(_ context.Context, _ uint64, _ *ethpb.SyncCommitteeMessage) error + func (p *TestP2P) Connect(b *TestP2P) + func (p *TestP2P) Disconnect(pid peer.ID) error + func (p *TestP2P) ForkDigest() ([4]byte, error) + func (p *TestP2P) Host() host.Host + func (p *TestP2P) JoinTopic(topic string, opts ...pubsub.TopicOpt) (*pubsub.Topic, error) + func (p *TestP2P) LeaveTopic(topic string) error + func (p *TestP2P) Metadata() metadata.Metadata + func (p *TestP2P) MetadataSeq() uint64 + func (p *TestP2P) PeerID() peer.ID + func (p *TestP2P) Peers() *peers.Status + func (p *TestP2P) PubSub() *pubsub.PubSub + func (p *TestP2P) PublishToTopic(ctx context.Context, topic string, data []byte, opts ...pubsub.PubOpt) error + func (p *TestP2P) ReceivePubSub(topic string, msg proto.Message) + func (p *TestP2P) ReceiveRPC(topic string, msg proto.Message) + func (p *TestP2P) Send(ctx context.Context, msg interface{}, topic string, pid peer.ID) (network.Stream, error) + func (p *TestP2P) SetStreamHandler(topic string, handler network.StreamHandler) + func (p *TestP2P) SubscribeToTopic(topic string, opts ...pubsub.SubOpt) (*pubsub.Subscription, error)