From bc7398bc7be984c930ca92734d46adaf1841a304 Mon Sep 17 00:00:00 2001 From: Block Mechanic Date: Tue, 12 Apr 2022 09:51:12 +0200 Subject: [PATCH] Remove debug lines --- src/crown/nodewallet.cpp | 12 ------------ src/qt/transactionrecord.cpp | 7 ++++--- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/crown/nodewallet.cpp b/src/crown/nodewallet.cpp index 2dfbd77..53c466a 100644 --- a/src/crown/nodewallet.cpp +++ b/src/crown/nodewallet.cpp @@ -233,7 +233,6 @@ bool NodeWallet::CreateCoinStake(const int nHeight, const uint32_t& nBits, const template bool GetPointers(stakingnode* pstaker, std::vector& vStakePointers, int nPaymentSlot) { - LogPrintf("%s: 1\n", __func__); bool found = false; // get block index of last mn payment std::vector vBlocksLastPaid; @@ -241,12 +240,10 @@ bool GetPointers(stakingnode* pstaker, std::vector& vStakePointers LogPrintf("GetRecentStakePointer -- Couldn't find last paid block\n"); return false; } - LogPrintf("%s: 2\n", __func__); int nBestHeight = ::ChainActive().Height(); for (auto pindex : vBlocksLastPaid) { if (budget.IsBudgetPaymentBlock(pindex->nHeight)) continue; - LogPrintf("%s: 2.1\n", __func__); // Pointer has to be at least deeper than the max reorg depth const int nMaxReorganizationDepth = 100; @@ -258,22 +255,16 @@ bool GetPointers(stakingnode* pstaker, std::vector& vStakePointers LogPrintf("GetRecentStakePointer -- Failed reading block from disk\n"); return false; } - LogPrintf("%s: 2.2\n", __func__); CScript scriptMNPubKey; scriptMNPubKey = GetScriptForDestination(PKHash(pstaker->pubkey)); - LogPrintf("%s: 2.3\n", __func__); for (auto& tx : blockLastPaid.vtx) { - LogPrintf("%s: 2.4.0\n", __func__); - auto stakeSource = COutPoint(tx->GetHash(), nPaymentSlot); uint256 hashPointer = stakeSource.GetHash(); if (mapUsedStakePointers.count(hashPointer)) continue; - LogPrintf("%s: 2.4.1\n", __func__); - if (tx->IsCoinBase()) { CTxOutAsset mout = (tx->nVersion >= TX_ELE_VERSION ? tx->vpout[nPaymentSlot] : tx->vout[nPaymentSlot]); if(mout.scriptPubKey == scriptMNPubKey){ @@ -287,11 +278,8 @@ bool GetPointers(stakingnode* pstaker, std::vector& vStakePointers continue; } } - LogPrintf("%s: 2.4.2\n", __func__); - } } - LogPrintf("%s: 3\n", __func__); return found; } diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 7f1da83..b98d695 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -40,9 +40,10 @@ QList TransactionRecord::decomposeTransaction(const interface // // Credit // - for(unsigned int i = 0; i < wtx.tx->vout.size(); i++) - { - const CTxOut& txout = wtx.tx->vout[i]; + for (unsigned int i = 0; i < (wtx.tx->nVersion >= TX_ELE_VERSION ? wtx.tx->vpout.size() : wtx.tx->vout.size()); i++) { + CTxOutAsset txout = (wtx.tx->nVersion >= TX_ELE_VERSION ? wtx.tx->vpout[i] : wtx.tx->vout[i]); + + //const CTxOut& txout = wtx.tx->vout[i]; const CAsset& asset = wtx.txout_assets[i]; if (txout.IsFee()) { // explicit fee; ignore