Search in sources :

Example 1 with EthVersion

use of org.ethereum.net.eth.EthVersion in project rskj by rsksmart.

the class MessageCodesResolver method init.

public void init(List<Capability> caps) {
    Collections.sort(caps);
    int offset = P2pMessageCodes.USER.asByte() + 1;
    for (Capability capability : caps) {
        if (capability.getName().equals(Capability.RSK)) {
            setEthOffset(offset);
            EthVersion v = fromCode(capability.getVersion());
            offset += EthMessageCodes.values(v).length;
        }
    }
}
Also used : Capability(org.ethereum.net.client.Capability) EthVersion(org.ethereum.net.eth.EthVersion)

Aggregations

Capability (org.ethereum.net.client.Capability)1 EthVersion (org.ethereum.net.eth.EthVersion)1