diff --git a/src/main.cpp b/src/main.cpp index 6e5f9fb871d..d236c6d1d0a 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"); }