Skip to content

Commit

Permalink
mdf HelloMessage vsersion return type
Browse files Browse the repository at this point in the history
  • Loading branch information
xxo1shine committed Mar 29, 2018
1 parent 37aa150 commit 90740a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public byte[] getData() {
* Get the version of p2p protocol.
*/
public int getVersion() {
return (byte) this.helloMessage.getVersion();
return this.helloMessage.getVersion();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf buffer, List<Object> ou
}

final HelloMessage helloMessage = (HelloMessage) msg;
logger.info("helloMessage.getVersion() {}", helloMessage.getVersion());
logger.info("Args.getInstance().getNodeP2pVersion() {}", Args.getInstance().getNodeP2pVersion());

if (helloMessage.getVersion() != Args.getInstance().getNodeP2pVersion()) {
ctx.close();
return;
Expand Down

0 comments on commit 90740a8

Please sign in to comment.