Used wrong nonce for version message

This commit is contained in:
Christian Basler 2016-08-09 19:50:11 +02:00
parent 505818a712
commit cd3a801704
3 changed files with 8 additions and 8 deletions

View File

@ -162,7 +162,7 @@ class Connection extends AbstractConnection {
try (Socket socket = Connection.this.socket) {
initSocket(socket);
if (mode == CLIENT || mode == SYNC) {
send(new Version.Builder().defaults(peerNonce).addrFrom(host).addrRecv(node).build());
send(new Version.Builder().defaults(ctx.getClientNonce()).addrFrom(host).addrRecv(node).build());
}
while (state != DISCONNECTED) {
if (mode != SYNC) {

View File

@ -52,7 +52,7 @@ public class ConnectionInfo extends AbstractConnection {
super(context, mode, node, listener, commonRequestedObjects, syncTimeout);
headerOut.flip();
if (mode == CLIENT || mode == SYNC) {
send(new Version.Builder().defaults(peerNonce).addrFrom(host).addrRecv(node).build());
send(new Version.Builder().defaults(ctx.getClientNonce()).addrFrom(host).addrRecv(node).build());
}
}