From 8f0c0c16d384510b07aec3ca2dde2391429f1b0b Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Thu, 14 Jun 2012 18:31:08 +0200 Subject: [PATCH] Use a 64-bit nonce in ping Former code sent '0' as nonce, which was serialized as 32-bit. --- src/main.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6e5f9fb..d236c6d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2886,8 +2886,9 @@ bool SendMessages(CNode* pto, bool fSendTrickle) // Keep-alive ping. We send a nonce of zero because we don't use it anywhere // right now. if (pto->nLastSend && GetTime() - pto->nLastSend > 30 * 60 && pto->vSend.empty()) { + uint64 nonce = 0; if (pto->nVersion > BIP0031_VERSION) - pto->PushMessage("ping", 0); + pto->PushMessage("ping", nonce); else pto->PushMessage("ping"); } -- 1.7.1