Changed constant used in calculating most applicable coin to use in a transaction, from COIN to DUST_SOFT_LIMIT
This commit is contained in:
parent
b08bfd12b4
commit
f5fc30c2b5
|
@ -1263,13 +1263,13 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfT
|
|||
int64_t nBest;
|
||||
|
||||
ApproximateBestSubset(vValue, nTotalLower, nTargetValue, vfBest, nBest, 1000);
|
||||
if (nBest != nTargetValue && nTotalLower >= nTargetValue + COIN)
|
||||
ApproximateBestSubset(vValue, nTotalLower, nTargetValue + COIN, vfBest, nBest, 1000);
|
||||
if (nBest != nTargetValue && nTotalLower >= nTargetValue + DUST_SOFT_LIMIT)
|
||||
ApproximateBestSubset(vValue, nTotalLower, nTargetValue + DUST_SOFT_LIMIT, vfBest, nBest, 1000);
|
||||
|
||||
// If we have a bigger coin and (either the stochastic approximation didn't find a good solution,
|
||||
// or the next bigger coin is closer), return the bigger coin
|
||||
if (coinLowestLarger.second.first &&
|
||||
((nBest != nTargetValue && nBest < nTargetValue + COIN) || coinLowestLarger.first <= nBest))
|
||||
((nBest != nTargetValue && nBest < nTargetValue + DUST_SOFT_LIMIT) || coinLowestLarger.first <= nBest))
|
||||
{
|
||||
setCoinsRet.insert(coinLowestLarger.second);
|
||||
nValueRet += coinLowestLarger.first;
|
||||
|
|
Loading…
Reference in a new issue