|
|
@ -137,7 +137,7 @@ func (n *Network) NodeIDs() []types.NodeID { |
|
|
|
// doing error checks and cleanups.
|
|
|
|
func (n *Network) MakeChannels( |
|
|
|
t *testing.T, |
|
|
|
chDesc p2p.ChannelDescriptor, |
|
|
|
chDesc *p2p.ChannelDescriptor, |
|
|
|
messageType proto.Message, |
|
|
|
size int, |
|
|
|
) map[types.NodeID]*p2p.Channel { |
|
|
@ -153,7 +153,7 @@ func (n *Network) MakeChannels( |
|
|
|
// all the channels.
|
|
|
|
func (n *Network) MakeChannelsNoCleanup( |
|
|
|
t *testing.T, |
|
|
|
chDesc p2p.ChannelDescriptor, |
|
|
|
chDesc *p2p.ChannelDescriptor, |
|
|
|
messageType proto.Message, |
|
|
|
size int, |
|
|
|
) map[types.NodeID]*p2p.Channel { |
|
|
@ -281,7 +281,7 @@ func (n *Network) MakeNode(t *testing.T, opts NodeOptions) *Node { |
|
|
|
// MakeChannel opens a channel, with automatic error handling and cleanup. On
|
|
|
|
// test cleanup, it also checks that the channel is empty, to make sure
|
|
|
|
// all expected messages have been asserted.
|
|
|
|
func (n *Node) MakeChannel(t *testing.T, chDesc p2p.ChannelDescriptor, |
|
|
|
func (n *Node) MakeChannel(t *testing.T, chDesc *p2p.ChannelDescriptor, |
|
|
|
messageType proto.Message, size int) *p2p.Channel { |
|
|
|
channel, err := n.Router.OpenChannel(chDesc, messageType, size) |
|
|
|
require.NoError(t, err) |
|
|
@ -297,7 +297,7 @@ func (n *Node) MakeChannel(t *testing.T, chDesc p2p.ChannelDescriptor, |
|
|
|
// caller must ensure proper cleanup of the channel.
|
|
|
|
func (n *Node) MakeChannelNoCleanup( |
|
|
|
t *testing.T, |
|
|
|
chDesc p2p.ChannelDescriptor, |
|
|
|
chDesc *p2p.ChannelDescriptor, |
|
|
|
messageType proto.Message, |
|
|
|
size int, |
|
|
|
) *p2p.Channel { |
|
|
@ -333,8 +333,8 @@ func (n *Node) MakePeerUpdatesNoRequireEmpty(t *testing.T) *p2p.PeerUpdates { |
|
|
|
return sub |
|
|
|
} |
|
|
|
|
|
|
|
func MakeChannelDesc(chID p2p.ChannelID) p2p.ChannelDescriptor { |
|
|
|
return p2p.ChannelDescriptor{ |
|
|
|
func MakeChannelDesc(chID p2p.ChannelID) *p2p.ChannelDescriptor { |
|
|
|
return &p2p.ChannelDescriptor{ |
|
|
|
ID: chID, |
|
|
|
Priority: 5, |
|
|
|
SendQueueCapacity: 10, |
|
|
|