diff --git a/src/init.cpp b/src/init.cpp index f90e0d6f8..b96324981 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -164,6 +164,7 @@ std::atomic fRequestShutdown(false); void StartShutdown() { + fprintf(stderr,"fRequestShudown=true\n"); fRequestShutdown = true; } bool ShutdownRequested() @@ -314,11 +315,13 @@ void Shutdown() */ void HandleSIGTERM(int) { + fprintf(stderr,"%s\n",__FUNCTION__); fRequestShutdown = true; } void HandleSIGHUP(int) { + fprintf(stderr,"%s\n",__FUNCTION__); fReopenDebugLog = true; } @@ -1806,6 +1809,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) if (!fLoaded) { // first suggest a reindex if (!fReset) { + fprintf(stderr,"%s error in hd data\n", __FUNCTION__); bool fRet = uiInterface.ThreadSafeMessageBox( strLoadError + ".\n\n" + _("error in HDD data, might just need to update to latest, if that doesnt work, then you need to resync"), "", CClientUIInterface::MSG_ERROR | CClientUIInterface::BTN_ABORT); diff --git a/src/main.cpp b/src/main.cpp index 88f9f1de4..2dc174380 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4819,8 +4819,11 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl while (!queue.empty()) { CBlockIndex *pindex = queue.front(); queue.pop_front(); + pindex->nChainTx = (pindex->pprev ? pindex->pprev->nChainTx : 0) + pindex->nTx; if (pindex->pprev) { + pindex->nChainTx = pindex->pprev->nChainTx + pindex->nTx; + if (pindex->pprev->nChainSproutValue && pindex->nSproutValue) { pindex->nChainSproutValue = *pindex->pprev->nChainSproutValue + *pindex->nSproutValue; } else {