Permalink
Browse files

Use >= for BIP0031 version

  • Loading branch information...
1 parent 865a0c1 commit 6b938e847a0bd999d941db9f9a0ff43d48b448ca @luke-jr committed Apr 17, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/main.cpp
  2. +2 −2 src/version.h
View
@@ -2652,7 +2652,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
else if (strCommand == "ping")
{
- if (pfrom->nVersion > BIP0031_VERSION)
+ if (pfrom->nVersion >= BIP0031_VERSION)
{
uint64 nonce = 0;
vRecv >> nonce;
@@ -2834,7 +2834,7 @@ 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()) {
- if (pto->nVersion > BIP0031_VERSION)
+ if (pto->nVersion >= BIP0031_VERSION)
pto->PushMessage("ping", 0);
else
pto->PushMessage("ping");
View
@@ -42,7 +42,7 @@ static const int CADDR_TIME_VERSION = 31402;
static const int NOBLKS_VERSION_START = 32000;
static const int NOBLKS_VERSION_END = 32400;
-// BIP 0031, pong message, is enabled for all versions AFTER this one
-static const int BIP0031_VERSION = 60000;
+// BIP 0031, pong message, is enabled for all versions starting with this one
+static const int BIP0031_VERSION = 60001;
#endif

0 comments on commit 6b938e8

Please sign in to comment.