Merge pull request #951 from TheBlueMatt/headerslimit
authorGavin Andresen <gavinandresen@gmail.com>
Mon, 2 Apr 2012 18:22:11 +0000 (11:22 -0700)
committerGavin Andresen <gavinandresen@gmail.com>
Mon, 2 Apr 2012 18:22:11 +0000 (11:22 -0700)
Limit getheaders to a hard 2000.

src/main.cpp

index d795ca1..ca75b9f 100644 (file)
@@ -2504,8 +2504,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         }
 
         vector<CBlock> vHeaders;
-        int nLimit = 2000 + locator.GetDistanceBack();
-        printf("getheaders %d to %s limit %d\n", (pindex ? pindex->nHeight : -1), hashStop.ToString().substr(0,20).c_str(), nLimit);
+        int nLimit = 2000;
+        printf("getheaders %d to %s\n", (pindex ? pindex->nHeight : -1), hashStop.ToString().substr(0,20).c_str());
         for (; pindex; pindex = pindex->pnext)
         {
             vHeaders.push_back(pindex->GetBlockHeader());