Switch from removed duplicate method to calcPacketLength
This commit is contained in:
parent
4b790121b9
commit
b75218e3f2
|
@ -111,7 +111,7 @@ public class ClientPeer {
|
|||
|
||||
ByteBuf buffer = channel.alloc().buffer(payload.length + 8);
|
||||
buffer.writeBytes(StaticMessages.MAGIC_PACKET);
|
||||
buffer.writeBytes(ByteUtil.calcPacketSize(payload));
|
||||
buffer.writeBytes(ByteUtil.calcPacketLength(payload));
|
||||
buffer.writeBytes(payload);
|
||||
|
||||
logger.info("Send msg: [ " +
|
||||
|
|
|
@ -361,7 +361,7 @@ public class EthereumProtocolHandler extends ChannelInboundHandlerAdapter {
|
|||
|
||||
ByteBuf buffer = ctx.alloc().buffer(chainMessage.getPayload().length + 8);
|
||||
buffer.writeBytes(StaticMessages.MAGIC_PACKET);
|
||||
buffer.writeBytes(ByteUtil.calcPacketSize(chainMessage.getPayload()));
|
||||
buffer.writeBytes(ByteUtil.calcPacketLength(chainMessage.getPayload()));
|
||||
buffer.writeBytes(chainMessage.getPayload());
|
||||
|
||||
ctx.writeAndFlush(buffer);
|
||||
|
|
Loading…
Reference in New Issue