Tweak some logging
This commit is contained in:
@@ -4873,7 +4873,7 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
|
|||||||
// Update -zindex stats
|
// Update -zindex stats
|
||||||
if (fZindex) {
|
if (fZindex) {
|
||||||
if (fZdebug) {
|
if (fZdebug) {
|
||||||
fprintf(stderr,"%s: setting blockchain zstats with zspends=%d, zouts=%d\n", __FUNCTION__, nShieldedSpendsInBlock, nShieldedOutputsInBlock );
|
//fprintf(stderr,"%s: setting blockchain zstats with zspends=%d, zouts=%d\n", __FUNCTION__, nShieldedSpendsInBlock, nShieldedOutputsInBlock );
|
||||||
}
|
}
|
||||||
pindex->nChainNotarizations = (pindex->pprev ? pindex->pprev->nChainNotarizations : 0) + pindex->nNotarizations;
|
pindex->nChainNotarizations = (pindex->pprev ? pindex->pprev->nChainNotarizations : 0) + pindex->nNotarizations;
|
||||||
pindex->nChainShieldedTx = (pindex->pprev ? pindex->pprev->nChainShieldedTx : 0) + pindex->nShieldedTx;
|
pindex->nChainShieldedTx = (pindex->pprev ? pindex->pprev->nChainShieldedTx : 0) + pindex->nShieldedTx;
|
||||||
|
|||||||
@@ -1648,12 +1648,14 @@ 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();
|
||||||
|
LogPrintf("%s: zouts=%d in tx=%s\n",__func__,nZouts, hash.ToString().c_str());
|
||||||
|
|
||||||
mapSaplingNoteData_t noteData;
|
mapSaplingNoteData_t noteData;
|
||||||
SaplingIncomingViewingKeyMap viewingKeysToAdd;
|
SaplingIncomingViewingKeyMap viewingKeysToAdd;
|
||||||
|
|
||||||
// Protocol Spec: 4.19 Block Chain Scanning (Sapling)
|
// Protocol Spec: 4.19 Block Chain Scanning (Sapling)
|
||||||
for (uint32_t i = 0; i < tx.vShieldedOutput.size(); ++i) {
|
for (uint32_t i = 0; i < nZouts; ++i) {
|
||||||
const OutputDescription output = tx.vShieldedOutput[i];
|
const OutputDescription output = tx.vShieldedOutput[i];
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (auto it = mapSaplingFullViewingKeys.begin(); it != mapSaplingFullViewingKeys.end(); ++it) {
|
for (auto it = mapSaplingFullViewingKeys.begin(); it != mapSaplingFullViewingKeys.end(); ++it) {
|
||||||
@@ -2407,7 +2409,7 @@ for (map<std::pair<int,int>, CWalletTx*>::iterator it = mapSorted.begin(); it !=
|
|||||||
CWalletDB walletdb(strWalletFile, "r+", false);
|
CWalletDB walletdb(strWalletFile, "r+", false);
|
||||||
for (map<const uint256, CWalletTx*>::iterator it = mapUpdatedTxs.begin(); it != mapUpdatedTxs.end(); ++it) {
|
for (map<const uint256, CWalletTx*>::iterator it = mapUpdatedTxs.begin(); it != mapUpdatedTxs.end(); ++it) {
|
||||||
CWalletTx* pwtx = it->second;
|
CWalletTx* pwtx = it->second;
|
||||||
LogPrint("deletetx","Reorder Tx - Updating Positon to %i for Tx %s\n ", pwtx->nOrderPos, pwtx->GetHash().ToString());
|
LogPrintf("%s: Updating Positon to %i for Tx %s\n ", __func__, pwtx->nOrderPos, pwtx->GetHash().ToString());
|
||||||
pwtx->WriteToDisk(&walletdb);
|
pwtx->WriteToDisk(&walletdb);
|
||||||
mapWallet[pwtx->GetHash()].nOrderPos = pwtx->nOrderPos;
|
mapWallet[pwtx->GetHash()].nOrderPos = pwtx->nOrderPos;
|
||||||
}
|
}
|
||||||
@@ -2415,7 +2417,7 @@ for (map<std::pair<int,int>, CWalletTx*>::iterator it = mapSorted.begin(); it !=
|
|||||||
//Update Next Wallet Tx Positon
|
//Update Next Wallet Tx Positon
|
||||||
nOrderPosNext = previousPosition++;
|
nOrderPosNext = previousPosition++;
|
||||||
CWalletDB(strWalletFile).WriteOrderPosNext(nOrderPosNext);
|
CWalletDB(strWalletFile).WriteOrderPosNext(nOrderPosNext);
|
||||||
LogPrint("deletetx","Reorder Tx - Total Transactions Reordered %i, Next Position %i\n ", mapUpdatedTxs.size(), nOrderPosNext);
|
LogPrint("%s: Total Transactions Reordered %i, Next Position %i\n ", __func__, mapUpdatedTxs.size(), nOrderPosNext);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2430,9 +2432,9 @@ void CWallet::DeleteTransactions(std::vector<uint256> &removeTxs) {
|
|||||||
for (int i = 0; i< removeTxs.size(); i++) {
|
for (int i = 0; i< removeTxs.size(); i++) {
|
||||||
if (mapWallet.erase(removeTxs[i])) {
|
if (mapWallet.erase(removeTxs[i])) {
|
||||||
walletdb.EraseTx(removeTxs[i]);
|
walletdb.EraseTx(removeTxs[i]);
|
||||||
LogPrint("deletetx","Delete Tx - Deleting tx %s, %i.\n", removeTxs[i].ToString(),i);
|
LogPrintf("%s: Deleting tx %s, %i.\n", __func__, removeTxs[i].ToString(),i);
|
||||||
} else {
|
} else {
|
||||||
LogPrint("deletetx","Delete Tx - Deleting tx %failed.\n", removeTxs[i].ToString());
|
LogPrintf("%s: Deleting tx %failed.\n", __func__, removeTxs[i].ToString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user