Merge conflicts
This commit is contained in:
commit
37abf479fb
|
@ -27,7 +27,6 @@ import org.ethereum.net.message.TransactionsMessage;
|
||||||
import org.ethereum.util.ByteUtil;
|
import org.ethereum.util.ByteUtil;
|
||||||
import org.ethereum.util.RLP;
|
import org.ethereum.util.RLP;
|
||||||
import org.ethereum.util.RLPList;
|
import org.ethereum.util.RLPList;
|
||||||
import org.ethereum.util.Utils;
|
|
||||||
import org.spongycastle.util.encoders.Hex;
|
import org.spongycastle.util.encoders.Hex;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -121,7 +120,7 @@ public class EthereumProtocolHandler extends ChannelInboundHandlerAdapter {
|
||||||
byte[] payload = (byte[]) msg;
|
byte[] payload = (byte[]) msg;
|
||||||
|
|
||||||
System.out.print("msg: ");
|
System.out.print("msg: ");
|
||||||
Utils.printHexStringForByteArray(payload);
|
ByteUtil.printHexStringForByteArray(payload);
|
||||||
|
|
||||||
byte command = RLP.getCommandCode(payload);
|
byte command = RLP.getCommandCode(payload);
|
||||||
// got HELLO
|
// got HELLO
|
||||||
|
@ -344,7 +343,7 @@ public class EthereumProtocolHandler extends ChannelInboundHandlerAdapter {
|
||||||
|
|
||||||
ByteBuf buffer = ctx.alloc().buffer(chainMessage.getPayload().length + 8);
|
ByteBuf buffer = ctx.alloc().buffer(chainMessage.getPayload().length + 8);
|
||||||
buffer.writeBytes(StaticMessages.MAGIC_PACKET);
|
buffer.writeBytes(StaticMessages.MAGIC_PACKET);
|
||||||
buffer.writeBytes(Utils.calcPacketSize(chainMessage.getPayload()));
|
buffer.writeBytes(ByteUtil.calcPacketSize(chainMessage.getPayload()));
|
||||||
buffer.writeBytes(chainMessage.getPayload());
|
buffer.writeBytes(chainMessage.getPayload());
|
||||||
|
|
||||||
ctx.writeAndFlush(buffer);
|
ctx.writeAndFlush(buffer);
|
||||||
|
|
Loading…
Reference in New Issue