Only log when zouts exist and less noise to STDOUT by default

This commit is contained in:
Duke Leto
2020-12-06 20:24:02 -05:00
parent 5ae912ef03
commit 18910ca14d
2 changed files with 12 additions and 8 deletions

View File

@@ -4786,7 +4786,9 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
fprintf(stderr,"%s: tx=%s has zspends=%d zouts=%d\n", __FUNCTION__, tx.GetHash().ToString().c_str(), nShieldedSpends, nShieldedOutputs ); fprintf(stderr,"%s: tx=%s has zspends=%d zouts=%d\n", __FUNCTION__, tx.GetHash().ToString().c_str(), nShieldedSpends, nShieldedOutputs );
} }
} }
if (fDebug) {
fprintf(stderr,"%s: block %s has total zspends=%d zouts=%d\n", __FUNCTION__, block.GetHash().ToString().c_str(), nShieldedSpendsInBlock, nShieldedOutputsInBlock ); fprintf(stderr,"%s: block %s has total zspends=%d zouts=%d\n", __FUNCTION__, block.GetHash().ToString().c_str(), nShieldedSpendsInBlock, nShieldedOutputsInBlock );
}
pindexNew->nSproutValue = sproutValue; pindexNew->nSproutValue = sproutValue;
pindexNew->nChainSproutValue = boost::none; pindexNew->nChainSproutValue = boost::none;

View File

@@ -1687,7 +1687,9 @@ std::pair<mapSaplingNoteData_t, SaplingIncomingViewingKeyMap> CWallet::FindMySap
LOCK(cs_SpendingKeyStore); LOCK(cs_SpendingKeyStore);
uint256 hash = tx.GetHash(); uint256 hash = tx.GetHash();
uint32_t nZouts = tx.vShieldedOutput.size(); uint32_t nZouts = tx.vShieldedOutput.size();
if(fDebug && (nZouts > 0)) {
LogPrintf("%s: zouts=%d in tx=%s\n",__func__,nZouts, hash.ToString().c_str()); LogPrintf("%s: zouts=%d in tx=%s\n",__func__,nZouts, hash.ToString().c_str());
}
mapSaplingNoteData_t noteData; mapSaplingNoteData_t noteData;
SaplingIncomingViewingKeyMap viewingKeysToAdd; SaplingIncomingViewingKeyMap viewingKeysToAdd;