From d942c58d4a21f2f3fdebc8aaec59f2a169984e68 Mon Sep 17 00:00:00 2001 From: Michael Toutonghi Date: Wed, 16 May 2018 06:10:45 -0700 Subject: [PATCH] revert testing changes back to original --- src/main.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index be311b0c4..2a8463b5d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6015,8 +6015,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, pindex = chainActive.Next(pindex); } - // must use CBlocks because CBlockHeaders won't include the 0x00 nTx count at the end - vector vHeaders; + // we must use CBlocks, as CBlockHeaders won't include the 0x00 nTx count at the end + vector vHeaders; int nLimit = MAX_HEADERS_RESULTS; 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 @@ -6024,10 +6024,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, pfrom->lasthdrsreq = (int32_t)(pindex ? pindex->nHeight : -1); for (; pindex; pindex = chainActive.Next(pindex)) { - CBlockHeader h = 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); + vHeaders.push_back(pindex->GetBlockHeader()); if (--nLimit <= 0 || pindex->GetBlockHash() == hashStop) break; }