use of org.ethereum.net.client.ConfigCapabilitiesImpl in project rskj by rsksmart.
the class HandshakeHandlerTest method setup.
@Before
public void setup() {
RskSystemProperties config = new TestSystemProperties();
hhKey = config.getMyKey();
handler = new HandshakeHandler(config, mock(PeerScoringManager.class), mock(P2pHandler.class), mock(MessageCodec.class), // this needs to be the real object so we can test changing the HELLO message
new ConfigCapabilitiesImpl(config));
channel = mock(Channel.class);
when(channel.getNodeStatistics()).thenReturn(new NodeStatistics());
// We don't pass the handler to the constructor to avoid calling HandshakeHandler.channelActive
ch = new EmbeddedChannel();
ch.pipeline().addLast(handler);
ctx = ch.pipeline().firstContext();
}
Aggregations