diff --git a/src/asyncrpcoperation.cpp b/src/asyncrpcoperation.cpp index dd4e481da..328b3b9ff 100644 --- a/src/asyncrpcoperation.cpp +++ b/src/asyncrpcoperation.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2016 The Zcash developers +// Copyright (c) 2019-2020 The Hush developers // Distributed under the MIT software license, see the accompanying // file COPYING or https://www.opensource.org/licenses/mit-license.php - /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * diff --git a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp index 88231c1ed..855df3835 100644 --- a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp +++ b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp @@ -78,7 +78,7 @@ void AsyncRPCOperation_saplingconsolidation::main() { bool AsyncRPCOperation_saplingconsolidation::main_impl() { bool status=true; auto opid=getId(); - LogPrint("zrpcunsafe", "%s: Beginning AsyncRPCOperation_saplingconsolidation.\n", opid); + LogPrintf("%s: Beginning AsyncRPCOperation_saplingconsolidation.\n", __func__, opid); auto consensusParams = Params().GetConsensus(); auto nextActivationHeight = NextActivationHeight(targetHeight_, consensusParams); if (nextActivationHeight && targetHeight_ + CONSOLIDATION_EXPIRY_DELTA >= nextActivationHeight.get()) { @@ -161,7 +161,7 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { auto builder = TransactionBuilder(consensusParams, targetHeight_, pwalletMain); //builder.SetExpiryHeight(targetHeight_ + CONSOLIDATION_EXPIRY_DELTA); auto actualAmountToSend = amountToSend < fConsolidationTxFee ? 0 : amountToSend - fConsolidationTxFee; - LogPrint("zrpcunsafe", "%s: Beginning to create transaction with Sapling output amount=%s\n", opid, FormatMoney(actualAmountToSend)); + LogPrintf("%s: %s Beginning to create transaction with Sapling output amount=%s\n", __func__, opid, FormatMoney(actualAmountToSend)); // Select Sapling notes std::vector ops; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 42014f75e..b6548cb42 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2452,20 +2452,22 @@ void CWallet::UpdateWalletTransactionOrder(std::map, CWalletT CWalletDB walletdb(strWalletFile, "r+", false); for (map::iterator it = mapUpdatedTxs.begin(); it != mapUpdatedTxs.end(); ++it) { CWalletTx* pwtx = it->second; - LogPrintf("%s: Updating Positon to %i for Tx %s\n ", __func__, pwtx->nOrderPos, pwtx->GetHash().ToString()); + LogPrintf("%s: Updating Position to %i for Tx %s\n ", __func__, pwtx->nOrderPos, pwtx->GetHash().ToString()); bool ret = pwtx->WriteToDisk(&walletdb); if(fZdebug) fprintf(stderr,"%s: wrote data to disk at %s for tx=%s ret=%d\n",__func__, strWalletFile.c_str(), pwtx->GetHash().ToString().c_str(), ret ); mapWallet[pwtx->GetHash()].nOrderPos = pwtx->nOrderPos; } + if(fZdebug) + fprintf(stderr,"%s: updated nOrderPos on %lu transactions\n",__func__, mapUpdatedTxs.size() ); - //Update Next Wallet Tx Positon + //Update Next Wallet Tx Position nOrderPosNext = previousPosition++; CWalletDB(strWalletFile).WriteOrderPosNext(nOrderPosNext); if(fZdebug) fprintf(stderr,"%s: wrote data to disk at %s nOrderPosNext=%li\n",__func__, strWalletFile.c_str(), nOrderPosNext ); - LogPrint("%s: Total Transactions Reordered %i, Next Position %i\n ", __func__, mapUpdatedTxs.size(), nOrderPosNext); + LogPrintf("%s: Total Transactions Reordered %i, Next Position %i\n ", __func__, mapUpdatedTxs.size(), nOrderPosNext); } /** @@ -2692,7 +2694,7 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) int64_t nNow = GetTime(); const CChainParams& chainParams = Params(); if(fZdebug) - LogPrintf("%s: fUpdate=%d now=%li\n",fUpdate,nNow); + LogPrintf("%s: fUpdate=%d now=%li\n",__func__,fUpdate,nNow); CBlockIndex* pindex = pindexStart; { @@ -2755,7 +2757,7 @@ void CWallet::ReacceptWalletTransactions() { int64_t nNow = GetTime(); if(fZdebug) - LogPrintf("%s: now=%li\n",nNow); + LogPrintf("%s: now=%li\n",__func__,nNow); if ( IsInitialBlockDownload() ) return; @@ -2814,7 +2816,7 @@ bool CWalletTx::RelayWalletTransaction() { int64_t nNow = GetTime(); if(fZdebug) - LogPrintf("%s: now=%li\n",nNow); + LogPrintf("%s: now=%li\n",__func__,nNow); if ( pwallet == 0 ) { //fprintf(stderr,"unexpected null pwallet in RelayWalletTransaction\n");