From a30b43925951be2aef4a4f9fa7aad80e88eeb3d5 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 6 Feb 2015 08:38:29 +0300 Subject: [PATCH 1/2] 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 f1ac2911d1..ac0fa6ed9e 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; From ab28751bbe5de380620a85cc51e2d8096bb9a768 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sat, 7 Feb 2015 08:19:02 +0300 Subject: [PATCH 2/2] fix --- src/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet.cpp b/src/wallet.cpp index ac0fa6ed9e..befdd43f09 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1452,7 +1452,7 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfT nValueRet += coinLowestLarger.first; } else { - string s = "CWallet::SelectCoins best subset: "; + string s = "CWallet::SelectCoinsMinConf best subset: "; for (unsigned int i = 0; i < vValue.size(); i++) { if (vfBest[i])