Browse Source

Merge pull request #951 from TheBlueMatt/headerslimit

Limit getheaders to a hard 2000.
0.8
Gavin Andresen 13 years ago
parent
commit
85ea8b4f43
  1. 4
      src/main.cpp

4
src/main.cpp

@ -2504,8 +2504,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) @@ -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());

Loading…
Cancel
Save