use of co.rsk.net.MessageChannel in project rskj by rsksmart.
the class SimpleChannelManager method getMockedChannel.
private Channel getMockedChannel(MessageChannel mc) {
Channel channel = mock(Channel.class);
when(channel.getNodeId()).thenReturn(mc.getPeerNodeID());
return channel;
}
use of co.rsk.net.MessageChannel in project rskj by rsksmart.
the class SimpleChannelManager method getMessageChannel.
public MessageChannel getMessageChannel(SimpleNode sender, SimpleNode receiver) {
MessageChannel channel = simpleChannels.get(sender.getNodeID());
if (channel != null) {
return channel;
}
channel = new SimpleNodeChannel(sender, receiver);
simpleChannels.put(channel.getPeerNodeID(), channel);
return channel;
}
Aggregations