use of co.rsk.net.eth.RskWireProtocol in project rskj by rsksmart.
the class Channel method activateEth.
public void activateEth(ChannelHandlerContext ctx, EthVersion version) {
if (version != EthVersion.V62) {
throw new IllegalArgumentException(String.format("Eth version %s is not supported", version));
}
messageCodec.setEthVersion(version);
messageCodec.setEthMessageFactory(eth62MessageFactory);
RskWireProtocol handler = rskWireProtocolFactory.newInstance(msgQueue, this);
logger.info("Eth{} [ address = {} | id = {} ]", handler.getVersion(), inetSocketAddress, getPeerId());
ctx.pipeline().addLast(Capability.RSK, handler);
handler.activate();
eth = handler;
}
Aggregations