revert testing changes back to original
This commit is contained in:
@@ -6015,8 +6015,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
|||||||
pindex = chainActive.Next(pindex);
|
pindex = chainActive.Next(pindex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// must use CBlocks because CBlockHeaders won't include the 0x00 nTx count at the end
|
// we must use CBlocks, as CBlockHeaders won't include the 0x00 nTx count at the end
|
||||||
vector<CBlockHeader> vHeaders;
|
vector<CBlock> vHeaders;
|
||||||
int nLimit = MAX_HEADERS_RESULTS;
|
int nLimit = MAX_HEADERS_RESULTS;
|
||||||
LogPrint("net", "getheaders %d to %s from peer=%d\n", (pindex ? pindex->nHeight : -1), hashStop.ToString(), pfrom->id);
|
LogPrint("net", "getheaders %d to %s from peer=%d\n", (pindex ? pindex->nHeight : -1), hashStop.ToString(), pfrom->id);
|
||||||
//if ( pfrom->lasthdrsreq >= chainActive.Height()-MAX_HEADERS_RESULTS || pfrom->lasthdrsreq != (int32_t)(pindex ? pindex->nHeight : -1) )// no need to ever suppress this
|
//if ( pfrom->lasthdrsreq >= chainActive.Height()-MAX_HEADERS_RESULTS || pfrom->lasthdrsreq != (int32_t)(pindex ? pindex->nHeight : -1) )// no need to ever suppress this
|
||||||
@@ -6024,10 +6024,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
|||||||
pfrom->lasthdrsreq = (int32_t)(pindex ? pindex->nHeight : -1);
|
pfrom->lasthdrsreq = (int32_t)(pindex ? pindex->nHeight : -1);
|
||||||
for (; pindex; pindex = chainActive.Next(pindex))
|
for (; pindex; pindex = chainActive.Next(pindex))
|
||||||
{
|
{
|
||||||
CBlockHeader h = pindex->GetBlockHeader();
|
vHeaders.push_back(pindex->GetBlockHeader());
|
||||||
// we seem to be off by one, see if adding one to solution addresses the problem
|
|
||||||
h.nSolution.push_back(0);
|
|
||||||
vHeaders.push_back(h);
|
|
||||||
if (--nLimit <= 0 || pindex->GetBlockHash() == hashStop)
|
if (--nLimit <= 0 || pindex->GetBlockHash() == hashStop)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user