From 0260821f8723710b1ab18e89638a9f51fb1961bc Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sat, 26 May 2018 21:03:08 +0300 Subject: [PATCH] fix SelectCoinsByDenominations (#2074) Should return all denoms, excluding some for privacy reason is the job for PrepareDenominate --- src/wallet/wallet.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 6cc667122..4f9665103 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3034,13 +3034,6 @@ bool CWallet::SelectCoinsByDenominations(int nDenom, CAmount nValueMin, CAmount for (const auto& nBit : vecBits) { if(out.tx->tx->vout[out.i].nValue == vecPrivateSendDenominations[nBit]) { - if(nValueRet >= nValueMin) { - //randomly reduce the max amount we'll submit (for anonymity) - nValueMax -= insecure_rand.rand32(nValueMax/5); - //on average use 50% of the inputs or less - int r = insecure_rand.rand32(vCoins.size()); - if((int)vecTxDSInRet.size() > r) return true; - } nValueRet += out.tx->tx->vout[out.i].nValue; vecTxDSInRet.push_back(CTxDSIn(txin, out.tx->tx->vout[out.i].scriptPubKey)); vCoinsRet.push_back(out);