Merge pull request #167 from UdjinM6/v0.11.1.x_fix_SelectCoins_best_sub_loops

optimize SelectCoinsMinConf best subset loops
This commit is contained in:
evan82 2015-02-07 13:12:30 -07:00
commit 01356fca76

View File

@ -1471,18 +1471,17 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfT
nValueRet += coinLowestLarger.first;
}
else {
string s = "CWallet::SelectCoinsMinConf 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;