Merge pull request #274 from UdjinM6/v0.11.2.x_dont_limit_dssend_inputs
V0.11.2.x don't limit ds-send inputs number artificially, fees should take care of it instead
This commit is contained in:
commit
d2c868a9a4
@ -1486,6 +1486,8 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfT
|
||||
|
||||
bool CWallet::SelectCoins(int64_t nTargetValue, set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64_t& nValueRet, const CCoinControl* coinControl, AvailableCoinsType coin_type, bool useIX) const
|
||||
{
|
||||
// Note: this function should never be used for "always free" tx types like dstx
|
||||
|
||||
vector<COutput> vCoins;
|
||||
AvailableCoins(vCoins, true, coinControl, ALL_COINS, useIX);
|
||||
|
||||
@ -1494,19 +1496,17 @@ bool CWallet::SelectCoins(int64_t nTargetValue, set<pair<const CWalletTx*,unsign
|
||||
// Make outputs by looping through denominations, from large to small
|
||||
BOOST_FOREACH(int64_t v, darkSendDenominations)
|
||||
{
|
||||
int added = 0;
|
||||
BOOST_FOREACH(const COutput& out, vCoins)
|
||||
{
|
||||
if(out.tx->vout[out.i].nValue == v //make sure it's the denom we're looking for
|
||||
&& nValueRet + out.tx->vout[out.i].nValue < nTargetValue + (0.1*COIN)+100 //round the amount up to .1DRK over
|
||||
&& added <= 50){ //don't add more than 50 of one denom type
|
||||
){
|
||||
CTxIn vin = CTxIn(out.tx->GetHash(),out.i);
|
||||
int rounds = GetInputDarksendRounds(vin);
|
||||
// make sure it's actually anonymized
|
||||
if(rounds < nDarksendRounds) continue;
|
||||
nValueRet += out.tx->vout[out.i].nValue;
|
||||
setCoinsRet.insert(make_pair(out.tx, out.i));
|
||||
added++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user