From a30b43925951be2aef4a4f9fa7aad80e88eeb3d5 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 6 Feb 2015 08:38:29 +0300 Subject: [PATCH] optimize SelectCoins best subset debug output --- src/wallet.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/wallet.cpp b/src/wallet.cpp index f1ac2911d..ac0fa6ed9 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1452,18 +1452,17 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfT nValueRet += coinLowestLarger.first; } else { + string s = "CWallet::SelectCoins best subset: "; for (unsigned int i = 0; i < vValue.size(); i++) + { if (vfBest[i]) { setCoinsRet.insert(vValue[i].second); nValueRet += vValue[i].first; + s += FormatMoney(vValue[i].first); } - - LogPrint("selectcoins", "SelectCoins() best subset: "); - for (unsigned int i = 0; i < vValue.size(); i++) - if (vfBest[i]) - LogPrint("selectcoins", "%s ", FormatMoney(vValue[i].first)); - LogPrint("selectcoins", "total %s\n", FormatMoney(nBest)); + } + LogPrintf("%s - total %s\n", s, FormatMoney(nBest)); } return true;