testing

package
v7.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: GPL-3.0 Imports: 40 Imported by: 0

Documentation

Overview

Package testing includes useful utilities for mocking a beacon node's p2p service for unit tests.

Index

Constants

View Source
const (
	MockRawPeerId0 = "16Uiu2HAkyWZ4Ni1TpvDS8dPxsozmHY85KaiFjodQuV6Tz5tkHVeR"
	MockRawPeerId1 = "16Uiu2HAm4HgJ9N1o222xK61o7LSgToYWoAy1wNTJRkh9gLZapVAy"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeP2P

type FakeP2P struct {
}

FakeP2P stack

func NewFuzzTestP2P

func NewFuzzTestP2P() *FakeP2P

NewFuzzTestP2P - Create a new fake p2p stack.

func (*FakeP2P) AddConnectionHandler

func (*FakeP2P) AddConnectionHandler(_, _ func(ctx context.Context, id peer.ID) error)

AddConnectionHandler -- fake.

func (*FakeP2P) AddDisconnectionHandler

func (*FakeP2P) AddDisconnectionHandler(_ func(ctx context.Context, id peer.ID) error)

AddDisconnectionHandler -- fake.

func (*FakeP2P) AddPingMethod

func (*FakeP2P) AddPingMethod(_ func(ctx context.Context, id peer.ID) error)

AddPingMethod -- fake.

func (*FakeP2P) Broadcast

func (*FakeP2P) Broadcast(_ context.Context, _ proto.Message) error

Broadcast -- fake.

func (*FakeP2P) BroadcastAttestation

func (*FakeP2P) BroadcastAttestation(_ context.Context, _ uint64, _ ethpb.Att) error

BroadcastAttestation -- fake.

func (*FakeP2P) BroadcastBlob

func (*FakeP2P) BroadcastBlob(_ context.Context, _ uint64, _ *ethpb.BlobSidecar) error

BroadcastBlob -- fake.

func (*FakeP2P) BroadcastDataColumnSidecars

func (*FakeP2P) BroadcastDataColumnSidecars(_ context.Context, _ []blocks.VerifiedRODataColumn) error

BroadcastDataColumnSidecar -- fake.

func (*FakeP2P) BroadcastLightClientFinalityUpdate

func (*FakeP2P) BroadcastLightClientFinalityUpdate(_ context.Context, _ interfaces.LightClientFinalityUpdate) error

BroadcastLightClientFinalityUpdate -- fake.

func (*FakeP2P) BroadcastLightClientOptimisticUpdate

func (*FakeP2P) BroadcastLightClientOptimisticUpdate(_ context.Context, _ interfaces.LightClientOptimisticUpdate) error

BroadcastLightClientOptimisticUpdate -- fake.

func (*FakeP2P) BroadcastSyncCommitteeMessage

func (*FakeP2P) BroadcastSyncCommitteeMessage(_ context.Context, _ uint64, _ *ethpb.SyncCommitteeMessage) error

BroadcastSyncCommitteeMessage -- fake.

func (*FakeP2P) CustodyGroupCount

func (*FakeP2P) CustodyGroupCount(context.Context) (uint64, error)

CustodyGroupCount -- fake.

func (*FakeP2P) CustodyGroupCountFromPeer

func (*FakeP2P) CustodyGroupCountFromPeer(peer.ID) uint64

CustodyGroupCountFromPeer -- fake.

func (*FakeP2P) Disconnect

func (*FakeP2P) Disconnect(_ peer.ID) error

Disconnect -- fake.

func (*FakeP2P) DiscoveryAddresses

func (*FakeP2P) DiscoveryAddresses() ([]multiaddr.Multiaddr, error)

DiscoveryAddresses -- fake

func (*FakeP2P) ENR

func (*FakeP2P) ENR() *enr.Record

ENR returns the enr of the local peer.

func (*FakeP2P) EarliestAvailableSlot

func (*FakeP2P) EarliestAvailableSlot(context.Context) (primitives.Slot, error)

EarliestAvailableSlot -- fake.

func (*FakeP2P) Encoding

func (*FakeP2P) Encoding() encoder.NetworkEncoding

Encoding -- fake.

func (*FakeP2P) FindAndDialPeersWithSubnets

func (*FakeP2P) FindAndDialPeersWithSubnets(ctx context.Context, topicFormat string, digest [fieldparams.VersionLength]byte, minimumPeersPerSubnet int, subnets map[uint64]bool) error

FindAndDialPeersWithSubnets mocks the p2p func.

func (*FakeP2P) Host

func (*FakeP2P) Host() host.Host

Host -- fake.

func (*FakeP2P) InterceptAccept

func (*FakeP2P) InterceptAccept(_ network.ConnMultiaddrs) (allow bool)

InterceptAccept -- fake.

func (*FakeP2P) InterceptAddrDial

func (*FakeP2P) InterceptAddrDial(peer.ID, multiaddr.Multiaddr) (allow bool)

InterceptAddrDial -- fake.

func (*FakeP2P) InterceptPeerDial

func (*FakeP2P) InterceptPeerDial(peer.ID) (allow bool)

InterceptPeerDial -- fake.

func (*FakeP2P) InterceptSecured

func (*FakeP2P) InterceptSecured(network.Direction, peer.ID, network.ConnMultiaddrs) (allow bool)

InterceptSecured -- fake.

func (*FakeP2P) InterceptUpgraded

func (*FakeP2P) InterceptUpgraded(network.Conn) (allow bool, reason control.DisconnectReason)

InterceptUpgraded -- fake.

func (*FakeP2P) JoinTopic

func (*FakeP2P) JoinTopic(_ string, _ ...pubsub.TopicOpt) (*pubsub.Topic, error)

JoinTopic -- fake.

func (*FakeP2P) LeaveTopic

func (*FakeP2P) LeaveTopic(_ string) error

LeaveTopic -- fake.

func (*FakeP2P) Metadata

func (*FakeP2P) Metadata() metadata.Metadata

Metadata -- fake.

func (*FakeP2P) MetadataSeq

func (*FakeP2P) MetadataSeq() uint64

MetadataSeq -- fake.

func (*FakeP2P) NodeID

func (*FakeP2P) NodeID() enode.ID

NodeID returns the node id of the local peer.

func (*FakeP2P) PeerID

func (*FakeP2P) PeerID() peer.ID

PeerID -- fake.

func (*FakeP2P) Peers

func (*FakeP2P) Peers() *peers.Status

Peers -- fake.

func (*FakeP2P) PubSub

func (*FakeP2P) PubSub() *pubsub.PubSub

PubSub -- fake.

func (*FakeP2P) PublishToTopic

func (*FakeP2P) PublishToTopic(_ context.Context, _ string, _ []byte, _ ...pubsub.PubOpt) error

PublishToTopic -- fake.

func (*FakeP2P) RefreshPersistentSubnets

func (*FakeP2P) RefreshPersistentSubnets()

RefreshPersistentSubnets mocks the p2p func.

func (*FakeP2P) Send

func (*FakeP2P) Send(_ context.Context, _ any, _ string, _ peer.ID) (network.Stream, error)

Send -- fake.

func (*FakeP2P) SetStreamHandler

func (*FakeP2P) SetStreamHandler(_ string, _ network.StreamHandler)

SetStreamHandler -- fake.

func (*FakeP2P) SubscribeToTopic

func (*FakeP2P) SubscribeToTopic(_ string, _ ...pubsub.SubOpt) (*pubsub.Subscription, error)

SubscribeToTopic -- fake.

func (*FakeP2P) UpdateCustodyInfo

func (s *FakeP2P) UpdateCustodyInfo(earliestAvailableSlot primitives.Slot, custodyGroupCount uint64) (primitives.Slot, uint64, error)

UpdateCustodyInfo -- fake.

func (*FakeP2P) UpdateEarliestAvailableSlot

func (*FakeP2P) UpdateEarliestAvailableSlot(earliestAvailableSlot primitives.Slot) error

UpdateEarliestAvailableSlot -- fake.

type MockBroadcaster

type MockBroadcaster struct {
	BroadcastCalled       atomic.Bool
	BroadcastMessages     []proto.Message
	BroadcastAttestations []ethpb.Att
	// contains filtered or unexported fields
}

MockBroadcaster implements p2p.Broadcaster for testing.

func (*MockBroadcaster) Broadcast

func (m *MockBroadcaster) Broadcast(_ context.Context, msg proto.Message) error

Broadcast records a broadcast occurred.

func (*MockBroadcaster) BroadcastAttestation

func (m *MockBroadcaster) BroadcastAttestation(_ context.Context, _ uint64, a ethpb.Att) error

BroadcastAttestation records a broadcast occurred.

func (*MockBroadcaster) BroadcastBlob

BroadcastBlob broadcasts a blob for mock.

func (*MockBroadcaster) BroadcastDataColumnSidecars

func (m *MockBroadcaster) BroadcastDataColumnSidecars(context.Context, []blocks.VerifiedRODataColumn) error

BroadcastDataColumnSidecar broadcasts a data column for mock.

func (*MockBroadcaster) BroadcastLightClientFinalityUpdate

func (m *MockBroadcaster) BroadcastLightClientFinalityUpdate(_ context.Context, _ interfaces.LightClientFinalityUpdate) error

BroadcastLightClientFinalityUpdate records a broadcast occurred.

func (*MockBroadcaster) BroadcastLightClientOptimisticUpdate

func (m *MockBroadcaster) BroadcastLightClientOptimisticUpdate(_ context.Context, _ interfaces.LightClientOptimisticUpdate) error

BroadcastLightClientOptimisticUpdate records a broadcast occurred.

func (*MockBroadcaster) BroadcastSyncCommitteeMessage

func (m *MockBroadcaster) BroadcastSyncCommitteeMessage(_ context.Context, _ uint64, _ *ethpb.SyncCommitteeMessage) error

BroadcastSyncCommitteeMessage records a broadcast occurred.

func (*MockBroadcaster) NumAttestations

func (m *MockBroadcaster) NumAttestations() int

NumAttestations returns the number of attestations broadcasted.

func (*MockBroadcaster) NumMessages

func (m *MockBroadcaster) NumMessages() int

NumMessages returns the number of messages broadcasted.

type MockHost

type MockHost struct {
	Addresses []ma.Multiaddr
}

MockHost is a fake implementation of libp2p2's Host interface.

func (*MockHost) Addrs

func (m *MockHost) Addrs() []ma.Multiaddr

Addrs --

func (*MockHost) Close

func (*MockHost) Close() error

Close --

func (*MockHost) ConnManager

func (*MockHost) ConnManager() connmgr.ConnManager

ConnManager --

func (*MockHost) Connect

func (*MockHost) Connect(_ context.Context, _ peer.AddrInfo) error

Connect --

func (*MockHost) EventBus

func (*MockHost) EventBus() event.Bus

EventBus --

func (*MockHost) ID

func (*MockHost) ID() peer.ID

ID --

func (*MockHost) Mux

func (*MockHost) Mux() protocol.Switch

Mux --

func (*MockHost) Network

func (*MockHost) Network() network.Network

Network --

func (*MockHost) NewStream

func (*MockHost) NewStream(_ context.Context, _ peer.ID, _ ...protocol.ID) (network.Stream, error)

NewStream --

func (*MockHost) Peerstore

func (*MockHost) Peerstore() peerstore.Peerstore

Peerstore --

func (*MockHost) RemoveStreamHandler

func (*MockHost) RemoveStreamHandler(_ protocol.ID)

RemoveStreamHandler --

func (*MockHost) SetStreamHandler

func (*MockHost) SetStreamHandler(_ protocol.ID, _ network.StreamHandler)

SetStreamHandler --

func (*MockHost) SetStreamHandlerMatch

func (*MockHost) SetStreamHandlerMatch(protocol.ID, func(id protocol.ID) bool, network.StreamHandler)

SetStreamHandlerMatch --

type MockIterator

type MockIterator struct {
	Nodes    []*enode.Node
	Position int
	Closed   bool
}

MockIterator is a mock implementation of enode.Iterator for testing

func NewMockIterator

func NewMockIterator(nodes []*enode.Node) *MockIterator

func (*MockIterator) Close

func (m *MockIterator) Close()

func (*MockIterator) Next

func (m *MockIterator) Next() bool

func (*MockIterator) Node

func (m *MockIterator) Node() *enode.Node

type MockListener

type MockListener struct {
	LocalNodeFunc   func() *enode.LocalNode
	SelfFunc        func() *enode.Node
	RandomNodesFunc func() enode.Iterator
	LookupFunc      func(enode.ID) []*enode.Node
	ResolveFunc     func(*enode.Node) *enode.Node
	PingFunc        func(*enode.Node) error
	RequestENRFunc  func(*enode.Node) (*enode.Node, error)
	RebootFunc      func() error
	CloseFunc       func()
	// contains filtered or unexported fields
}

MockListener is a mock implementation of the Listener and ListenerRebooter interfaces that can be used in tests. It provides configurable behavior for all methods.

func NewMockListener

func NewMockListener(localNode *enode.LocalNode, iterator enode.Iterator) *MockListener

NewMockListener creates a new MockListener with default implementations

func (*MockListener) Close

func (m *MockListener) Close()

func (*MockListener) LocalNode

func (m *MockListener) LocalNode() *enode.LocalNode

func (*MockListener) Lookup

func (m *MockListener) Lookup(id enode.ID) []*enode.Node

func (*MockListener) Ping

func (m *MockListener) Ping(node *enode.Node) error

func (*MockListener) RandomNodes

func (m *MockListener) RandomNodes() enode.Iterator

func (*MockListener) RebootListener

func (m *MockListener) RebootListener() error

func (*MockListener) RequestENR

func (m *MockListener) RequestENR(node *enode.Node) (*enode.Node, error)

func (*MockListener) Resolve

func (m *MockListener) Resolve(node *enode.Node) *enode.Node

func (*MockListener) Self

func (m *MockListener) Self() *enode.Node

type MockMetadataProvider

type MockMetadataProvider struct {
	Data metadata.Metadata
}

MockMetadataProvider is a fake implementation of the MetadataProvider interface.

func (*MockMetadataProvider) Metadata

func (m *MockMetadataProvider) Metadata() metadata.Metadata

Metadata --

func (*MockMetadataProvider) MetadataSeq

func (m *MockMetadataProvider) MetadataSeq() uint64

MetadataSeq --

type MockPeerManager

type MockPeerManager struct {
	Enr               *enr.Record
	PID               peer.ID
	BHost             host.Host
	DiscoveryAddr     []multiaddr.Multiaddr
	FailDiscoveryAddr bool
}

MockPeerManager is mock of the PeerManager interface.

func (*MockPeerManager) AddPingMethod

func (*MockPeerManager) AddPingMethod(_ func(ctx context.Context, id peer.ID) error)

AddPingMethod .

func (*MockPeerManager) Disconnect

func (*MockPeerManager) Disconnect(peer.ID) error

Disconnect .

func (*MockPeerManager) DiscoveryAddresses

func (m *MockPeerManager) DiscoveryAddresses() ([]multiaddr.Multiaddr, error)

DiscoveryAddresses .

func (*MockPeerManager) ENR

func (m *MockPeerManager) ENR() *enr.Record

ENR .

func (*MockPeerManager) FindAndDialPeersWithSubnets

func (*MockPeerManager) FindAndDialPeersWithSubnets(ctx context.Context, topicFormat string, digest [fieldparams.VersionLength]byte, minimumPeersPerSubnet int, subnets map[uint64]bool) error

FindAndDialPeersWithSubnet .

func (*MockPeerManager) Host

func (m *MockPeerManager) Host() host.Host

Host .

func (MockPeerManager) NodeID

func (m MockPeerManager) NodeID() enode.ID

NodeID .

func (*MockPeerManager) PeerID

func (m *MockPeerManager) PeerID() peer.ID

PeerID .

func (*MockPeerManager) RefreshPersistentSubnets

func (*MockPeerManager) RefreshPersistentSubnets()

RefreshPersistentSubnets .

type MockPeersProvider

type MockPeersProvider struct {
	// contains filtered or unexported fields
}

MockPeersProvider implements PeersProvider for testing.

func (*MockPeersProvider) ClearPeers

func (m *MockPeersProvider) ClearPeers()

ClearPeers removes all known peers.

func (*MockPeersProvider) Peers

func (m *MockPeersProvider) Peers() *peers.Status

Peers provides access the peer status.

type TestP2P

type TestP2P struct {
	BHost   host.Host
	EnodeID enode.ID

	BroadcastCalled atomic.Bool
	DelaySend       bool
	Digest          [4]byte

	LocalMetadata metadata.Metadata
	// contains filtered or unexported fields
}

TestP2P represents a p2p implementation that can be used for testing.

func NewTestP2P

func NewTestP2P(t *testing.T, userOptions ...config.Option) *TestP2P

NewTestP2P initializes a new p2p test service.

func NewTestP2PWithPubsubOptions added in v7.1.3

func NewTestP2PWithPubsubOptions(t *testing.T, pubsubOpts []pubsub.Option, userOptions ...config.Option) *TestP2P

NewTestP2PWithPubsubOptions initializes a new p2p test service with custom pubsub options.

func (*TestP2P) AddConnectionHandler

func (p *TestP2P) AddConnectionHandler(f, _ func(ctx context.Context, id peer.ID) error)

AddConnectionHandler handles the connection with a newly connected peer.

func (*TestP2P) AddDisconnectionHandler

func (p *TestP2P) AddDisconnectionHandler(f func(ctx context.Context, id peer.ID) error)

AddDisconnectionHandler --

func (*TestP2P) AddPingMethod

func (*TestP2P) AddPingMethod(_ func(ctx context.Context, id peer.ID) error)

AddPingMethod mocks the p2p func.

func (*TestP2P) Broadcast

func (p *TestP2P) Broadcast(_ context.Context, _ proto.Message) error

Broadcast a message.

func (*TestP2P) BroadcastAttestation

func (p *TestP2P) BroadcastAttestation(_ context.Context, _ uint64, _ ethpb.Att) error

BroadcastAttestation broadcasts an attestation.

func (*TestP2P) BroadcastBlob

func (p *TestP2P) BroadcastBlob(context.Context, uint64, *ethpb.BlobSidecar) error

BroadcastBlob broadcasts a blob for mock.

func (*TestP2P) BroadcastDataColumnSidecars

func (p *TestP2P) BroadcastDataColumnSidecars(context.Context, []blocks.VerifiedRODataColumn) error

BroadcastDataColumnSidecar broadcasts a data column for mock.

func (*TestP2P) BroadcastLightClientFinalityUpdate

func (p *TestP2P) BroadcastLightClientFinalityUpdate(_ context.Context, _ interfaces.LightClientFinalityUpdate) error

BroadcastLightClientFinalityUpdate broadcasts a finality update for mock.

func (*TestP2P) BroadcastLightClientOptimisticUpdate

func (p *TestP2P) BroadcastLightClientOptimisticUpdate(_ context.Context, _ interfaces.LightClientOptimisticUpdate) error

BroadcastLightClientOptimisticUpdate broadcasts an optimistic update for mock.

func (*TestP2P) BroadcastSyncCommitteeMessage

func (p *TestP2P) BroadcastSyncCommitteeMessage(_ context.Context, _ uint64, _ *ethpb.SyncCommitteeMessage) error

BroadcastSyncCommitteeMessage broadcasts a sync committee message.

func (*TestP2P) Connect

func (p *TestP2P) Connect(b *TestP2P)

Connect two test peers together.

func (*TestP2P) CustodyGroupCount

func (s *TestP2P) CustodyGroupCount(context.Context) (uint64, error)

CustodyGroupCount .

func (*TestP2P) CustodyGroupCountFromPeer

func (s *TestP2P) CustodyGroupCountFromPeer(pid peer.ID) uint64

CustodyGroupCountFromPeer retrieves custody group count from a peer. It first tries to get the custody group count from the peer's metadata, then falls back to the ENR value if the metadata is not available, then falls back to the minimum number of custody groups an honest node should custodiy and serve samples from if ENR is not available.

func (*TestP2P) Disconnect

func (p *TestP2P) Disconnect(pid peer.ID) error

Disconnect from a peer.

func (*TestP2P) DiscoveryAddresses

func (*TestP2P) DiscoveryAddresses() ([]multiaddr.Multiaddr, error)

DiscoveryAddresses --

func (*TestP2P) ENR

func (p *TestP2P) ENR() *enr.Record

ENR returns the enr of the local peer.

func (*TestP2P) EarliestAvailableSlot

func (s *TestP2P) EarliestAvailableSlot(context.Context) (primitives.Slot, error)

EarliestAvailableSlot .

func (*TestP2P) Encoding

func (*TestP2P) Encoding() encoder.NetworkEncoding

Encoding returns ssz encoding.

func (*TestP2P) FindAndDialPeersWithSubnets

func (*TestP2P) FindAndDialPeersWithSubnets(ctx context.Context, topicFormat string, digest [fieldparams.VersionLength]byte, minimumPeersPerSubnet int, subnets map[uint64]bool) error

FindAndDialPeersWithSubnets mocks the p2p func.

func (*TestP2P) ForkDigest

func (p *TestP2P) ForkDigest() ([4]byte, error)

ForkDigest mocks the p2p func.

func (*TestP2P) Host

func (p *TestP2P) Host() host.Host

Host returns the libp2p host of the local peer.

func (*TestP2P) InterceptAccept

func (*TestP2P) InterceptAccept(_ network.ConnMultiaddrs) (allow bool)

InterceptAccept .

func (*TestP2P) InterceptAddrDial

func (*TestP2P) InterceptAddrDial(peer.ID, multiaddr.Multiaddr) (allow bool)

InterceptAddrDial .

func (*TestP2P) InterceptPeerDial

func (*TestP2P) InterceptPeerDial(peer.ID) (allow bool)

InterceptPeerDial .

func (*TestP2P) InterceptSecured

func (*TestP2P) InterceptSecured(network.Direction, peer.ID, network.ConnMultiaddrs) (allow bool)

InterceptSecured .

func (*TestP2P) InterceptUpgraded

func (*TestP2P) InterceptUpgraded(network.Conn) (allow bool, reason control.DisconnectReason)

InterceptUpgraded .

func (*TestP2P) JoinTopic

func (p *TestP2P) JoinTopic(topic string, opts ...pubsub.TopicOpt) (*pubsub.Topic, error)

JoinTopic will join PubSub topic, if not already joined.

func (*TestP2P) LeaveTopic

func (p *TestP2P) LeaveTopic(topic string) error

LeaveTopic closes topic and removes corresponding handler from list of joined topics. This method will return error if there are outstanding event handlers or subscriptions.

func (*TestP2P) Metadata

func (p *TestP2P) Metadata() metadata.Metadata

Metadata mocks the peer's metadata.

func (*TestP2P) MetadataSeq

func (p *TestP2P) MetadataSeq() uint64

MetadataSeq mocks metadata sequence number.

func (*TestP2P) NodeID

func (p *TestP2P) NodeID() enode.ID

NodeID returns the node id of the local peer.

func (*TestP2P) PeerID

func (p *TestP2P) PeerID() peer.ID

PeerID returns the Peer ID of the local peer.

func (*TestP2P) Peers

func (p *TestP2P) Peers() *peers.Status

Peers returns the peer status.

func (*TestP2P) PubSub

func (p *TestP2P) PubSub() *pubsub.PubSub

PubSub returns reference underlying floodsub. This test library uses floodsub to ensure all connected peers receive the message.

func (*TestP2P) PublishToTopic

func (p *TestP2P) PublishToTopic(ctx context.Context, topic string, data []byte, opts ...pubsub.PubOpt) error

PublishToTopic publishes message to previously joined topic.

func (*TestP2P) ReceivePubSub

func (p *TestP2P) ReceivePubSub(topic string, msg proto.Message)

ReceivePubSub simulates an incoming message over pubsub on a given topic.

func (*TestP2P) ReceiveRPC

func (p *TestP2P) ReceiveRPC(topic string, msg proto.Message)

ReceiveRPC simulates an incoming RPC.

func (*TestP2P) RefreshPersistentSubnets

func (*TestP2P) RefreshPersistentSubnets()

RefreshPersistentSubnets mocks the p2p func.

func (*TestP2P) Send

func (p *TestP2P) Send(ctx context.Context, msg any, topic string, pid peer.ID) (network.Stream, error)

Send a message to a specific peer.

func (*TestP2P) SetStreamHandler

func (p *TestP2P) SetStreamHandler(topic string, handler network.StreamHandler)

SetStreamHandler for RPC.

func (*TestP2P) Started

func (*TestP2P) Started() bool

Started always returns true.

func (*TestP2P) SubscribeToTopic

func (p *TestP2P) SubscribeToTopic(topic string, opts ...pubsub.SubOpt) (*pubsub.Subscription, error)

SubscribeToTopic joins (if necessary) and subscribes to PubSub topic.

func (*TestP2P) UpdateCustodyInfo

func (s *TestP2P) UpdateCustodyInfo(earliestAvailableSlot primitives.Slot, custodyGroupCount uint64) (primitives.Slot, uint64, error)

UpdateCustodyInfo .

func (*TestP2P) UpdateEarliestAvailableSlot

func (s *TestP2P) UpdateEarliestAvailableSlot(earliestAvailableSlot primitives.Slot) error

UpdateEarliestAvailableSlot .

Jump to

Keyboard shortcuts

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