From: Pieter Wuille Date: Thu, 14 Jun 2012 16:31:08 +0000 (+0200) Subject: Use a 64-bit nonce in ping X-Git-Tag: v0.4.0-unstable~129^2~4 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=c58ff3781df53fb1186cad4e3f4bb1eaaf7aea88 Use a 64-bit nonce in ping Former code sent '0' as nonce, which was serialized as 32-bit. --- diff --git a/src/main.cpp b/src/main.cpp index c27115d..27feeca 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2898,8 +2898,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"); }