Search in sources :

Example 1 with RskWireProtocol

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;
}
Also used : RskWireProtocol(co.rsk.net.eth.RskWireProtocol)

Aggregations

RskWireProtocol (co.rsk.net.eth.RskWireProtocol)1