Examples of adaptMessageIds()


Examples of org.ethereum.net.p2p.P2pHandler.adaptMessageIds()

        P2pHandler p2pHandler = new P2pHandler();

    List<Capability> capabilities = Arrays.asList(
        new Capability(Capability.ETH, EthHandler.VERSION),
        new Capability(Capability.SHH, ShhHandler.VERSION));
        p2pHandler.adaptMessageIds(capabilities);

        Assert.assertEquals(0x10 + 0, EthMessageCodes.STATUS.asByte());
        Assert.assertEquals(0x10 + 1, EthMessageCodes.GET_TRANSACTIONS.asByte());
        Assert.assertEquals(0x10 + 2, EthMessageCodes.TRANSACTIONS.asByte());
        Assert.assertEquals(0x10 + 3, EthMessageCodes.GET_BLOCK_HASHES.asByte());
View Full Code Here

Examples of org.ethereum.net.p2p.P2pHandler.adaptMessageIds()

        P2pHandler p2pHandler = new P2pHandler();

    List<Capability> capabilities = Arrays.asList(
        new Capability(Capability.SHH, ShhHandler.VERSION),
        new Capability(Capability.ETH, EthHandler.VERSION));
        p2pHandler.adaptMessageIds(capabilities);

        Assert.assertEquals(0x10 + 0, EthMessageCodes.STATUS.asByte());
        Assert.assertEquals(0x10 + 1, EthMessageCodes.GET_TRANSACTIONS.asByte());
        Assert.assertEquals(0x10 + 2, EthMessageCodes.TRANSACTIONS.asByte());
        Assert.assertEquals(0x10 + 3, EthMessageCodes.GET_BLOCK_HASHES.asByte());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.