git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
01ed45c
)
Use a 64-bit nonce in ping
author
Pieter Wuille
<pieter.wuille@gmail.com>
Thu, 14 Jun 2012 16:31:08 +0000 (18:31 +0200)
committer
Luke Dashjr
<luke-jr+git@utopios.org>
Thu, 14 Jun 2012 18:00:49 +0000 (18:00 +0000)
Former code sent '0' as nonce, which was serialized as 32-bit.
src/main.cpp
patch
|
blob
|
history
diff --git
a/src/main.cpp
b/src/main.cpp
index
6e5f9fb
..
d236c6d
100644
(file)
--- 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");
}