Browse Source

Merge pull request #1463 from sipa/fix_1455

Use a 64-bit nonce in ping
miguelfreitas
Gregory Maxwell 13 years ago
parent
commit
194ea3186a
  1. 3
      src/main.cpp

3
src/main.cpp

@ -3013,8 +3013,9 @@ bool SendMessages(CNode* pto, bool fSendTrickle) @@ -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");
}

Loading…
Cancel
Save