Skip to content

Commit

Permalink
fix on the SignedProtoMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
Joao Leitao committed Mar 6, 2023
1 parent a5c3bc3 commit 7761287
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public void serialize(T msg, ByteBuf out) throws IOException {
if(msg.serializedMessage == null || msg.serializedMessage.length == 0) {
ByteBuf serial = Unpooled.buffer();
serial.writeShort(msg.getId());
this.serializeBody(msg, out);
this.serializeBody(msg, serial);
msg.serializedMessage = ByteBufUtil.getBytes(serial);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public final void signMessage(PrivateKey key) throws NoSuchAlgorithmException, I
} else {
ByteBuf b = Unpooled.buffer();
serializer.serializeBody(this, b);
this.serializedMessage = ByteBufUtil.getBytes(b);
this.serializedMessage = ByteBufUtil.getBytes(b.slice());
}
}

Expand Down

0 comments on commit 7761287

Please sign in to comment.