From 52670b7205eea26d4f2213f53589fa5bab90e166 Mon Sep 17 00:00:00 2001 From: Michael Toutonghi Date: Wed, 16 May 2018 00:23:55 -0700 Subject: [PATCH] going back to the original type mismatch - still debugging forking issue, checkin to try on other machines --- src/main.cpp | 6 +++--- src/miner.cpp | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index bd5b74eb6..1dedfd73d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6014,9 +6014,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, if (pindex) pindex = chainActive.Next(pindex); } - - // we should probably use CBlocks, as CBlockHeaders won't include the 0x00 nTx count at the end - vector vHeaders; + + // must use CBlocks because 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 diff --git a/src/miner.cpp b/src/miner.cpp index fe267ade8..59d962e8f 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -895,12 +895,13 @@ void static VerusStaker(CWallet *pwallet) // int64_t nStart = GetTime(); + // take up the necessary space for alignment + pblock->nSolution = solnPlaceholder; + // we don't use this, but IncrementExtraNonce is the function that builds the merkle tree unsigned int nExtraNonce = 0; IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); - pblock->nSolution = solnPlaceholder; - if (vNodes.empty() && chainparams.MiningRequiresPeers()) { if ( Mining_height > ASSETCHAINS_MINHEIGHT )