mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
Merge pull request #951 from TheBlueMatt/headerslimit
Limit getheaders to a hard 2000.
This commit is contained in:
commit
85ea8b4f43
1 changed files with 2 additions and 2 deletions
|
@ -2504,8 +2504,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<CBlock> vHeaders;
|
vector<CBlock> vHeaders;
|
||||||
int nLimit = 2000 + locator.GetDistanceBack();
|
int nLimit = 2000;
|
||||||
printf("getheaders %d to %s limit %d\n", (pindex ? pindex->nHeight : -1), hashStop.ToString().substr(0,20).c_str(), nLimit);
|
printf("getheaders %d to %s\n", (pindex ? pindex->nHeight : -1), hashStop.ToString().substr(0,20).c_str());
|
||||||
for (; pindex; pindex = pindex->pnext)
|
for (; pindex; pindex = pindex->pnext)
|
||||||
{
|
{
|
||||||
vHeaders.push_back(pindex->GetBlockHeader());
|
vHeaders.push_back(pindex->GetBlockHeader());
|
||||||
|
|
Loading…
Reference in a new issue