mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
don't limit ds-send inputs number artificially, fees should take care of it instead
This commit is contained in:
parent
8e5d3bc1f7
commit
ca53ddd32b
@ -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