diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-06-14 18:31:08 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-06-14 18:31:08 +0200 |
commit | c971112dfaeab836d8b626c862ede0059f5325b8 (patch) | |
tree | ab94565245c3e97c40165109c0dc8b445bad32ae | |
parent | d59bce21e5dbb0a15051e40d5dd717fd7bf982d8 (diff) |
Use a 64-bit nonce in ping
Former code sent '0' as nonce, which was serialized as 32-bit.
-rw-r--r-- | src/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index fa3eb592a9..be2733192e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3013,8 +3013,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"); } |