From 09219f4860e343d41728d0a666eee10ed56ee55b Mon Sep 17 00:00:00 2001 From: romanman Date: Thu, 22 May 2014 09:58:18 +0300 Subject: [PATCH] cosmetic --- .gitignore | 1 + .../ethereum/net/message/StaticMessages.java | 24 ++++--------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 06dbac46..60cb12b3 100644 --- a/.gitignore +++ b/.gitignore @@ -16,5 +16,6 @@ bin *.war *.ear /target +/src/main/java/samples *.db \ No newline at end of file diff --git a/ethereumj-core/src/main/java/org/ethereum/net/message/StaticMessages.java b/ethereumj-core/src/main/java/org/ethereum/net/message/StaticMessages.java index adec97bb..9842c8bd 100644 --- a/ethereumj-core/src/main/java/org/ethereum/net/message/StaticMessages.java +++ b/ethereumj-core/src/main/java/org/ethereum/net/message/StaticMessages.java @@ -10,25 +10,12 @@ import org.spongycastle.util.encoders.Hex; */ public class StaticMessages { - public static final byte[] PING = {(byte)0x22, (byte)0x40, (byte)0x08, (byte)0x91, - (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x02, - (byte)0xC1, (byte)0x02 }; - - public static final byte[] PONG = {(byte)0x22, (byte)0x40, (byte)0x08, (byte)0x91, - (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x02, - (byte)0xC1, (byte)0x03 }; - - public static final byte[] GET_PEERS = {(byte)0x22, (byte)0x40, (byte)0x08, (byte)0x91, - (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x02, - (byte)0xC1, (byte)0x10 }; - - public static final byte[] GET_TRANSACTIONS = {(byte)0x22, (byte)0x40, (byte)0x08, (byte)0x91, - (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x02, - (byte)0xC1, (byte)0x16 }; - + public static final byte[] PING = Hex.decode("2240089100000002C102"); + public static final byte[] PONG = Hex.decode("2240089100000002C103"); + public static final byte[] GET_PEERS = Hex.decode("2240089100000002C110"); + public static final byte[] GET_TRANSACTIONS = Hex.decode("2240089100000002C116"); public static final byte[] DISCONNECT_00 = Hex.decode("2240089100000003C20100"); - public static final byte[] GET_CHAIN = Hex.decode("2240089100000027F82514A069A7356A245F9DC5B865475ADA5EE4E89B18F93C06503A9DB3B3630E88E9FB4E820100"); public static final byte[] GENESIS_HASH = Hex.decode("c305511e7cb9b33767e50f5e94ecd7b1c51359a04f45183860ec6808d80b0d3f"); public static final byte[] MAGIC_PACKET = Hex.decode("22400891"); @@ -36,8 +23,7 @@ public class StaticMessages { byte[] peerIdBytes = HashUtil.randomPeerId(); - // Hey Nick I like it that way ;) - HELLO_MESSAGE = new HelloMessage((byte)0x10, (byte)0x00, "EthereumJ [v0.5.1] by RomanJ ", + HELLO_MESSAGE = new HelloMessage((byte)0x11, (byte)0x00, "EthereumJ [v0.5.1] by RomanJ ", (byte)0b00000111, (short)30303, peerIdBytes); }