add extra params to AvailableCoins calls

Signed-off-by: Pasta <pasta@dashboost.org>
This commit is contained in:
Pasta 2019-07-01 13:44:40 -05:00
parent 6ad8fe0e9f
commit 6ce3e55cb4
No known key found for this signature in database
GPG Key ID: D362C9F7142766AE
2 changed files with 7 additions and 7 deletions

View File

@ -320,7 +320,7 @@ UniValue masternode_outputs(const JSONRPCRequest& request)
// Find possible candidates
std::vector<COutput> vPossibleCoins;
pwallet->AvailableCoins(vPossibleCoins, true, NULL, false, ONLY_1000);
pwallet->AvailableCoins(vPossibleCoins, true, NULL, 0, MAX_MONEY, MAX_MONEY, 0, false, ONLY_1000);
UniValue obj(UniValue::VOBJ);
for (const auto& out : vPossibleCoins) {

View File

@ -3041,7 +3041,7 @@ bool CWallet::SelectPSInOutPairsByDenominations(int nDenom, CAmount nValueMin, C
return false;
}
AvailableCoins(vCoins, true, NULL, false, ONLY_DENOMINATED);
AvailableCoins(vCoins, true, NULL, 0, MAX_MONEY, MAX_MONEY, 0, false, ONLY_DENOMINATED);
LogPrintf("CWallet::%s -- vCoins.size(): %d\n", __func__, vCoins.size());
std::random_shuffle(vCoins.rbegin(), vCoins.rend(), GetRandInt);
@ -3183,7 +3183,7 @@ bool CWallet::SelectPrivateCoins(CAmount nValueMin, CAmount nValueMax, std::vect
nValueRet = 0;
std::vector<COutput> vCoins;
AvailableCoins(vCoins, true, coinControl, false, nPrivateSendRoundsMin < 0 ? ONLY_NONDENOMINATED : ONLY_DENOMINATED);
AvailableCoins(vCoins, true, coinControl, 0, MAX_MONEY, MAX_MONEY, 0, false, nPrivateSendRoundsMin < 0 ? ONLY_NONDENOMINATED : ONLY_DENOMINATED);
//order the array so largest nondenom are first, then denominations, then very small inputs.
std::sort(vCoins.rbegin(), vCoins.rend(), CompareByPriority());
@ -3217,7 +3217,7 @@ bool CWallet::GetCollateralTxDSIn(CTxDSIn& txdsinRet, CAmount& nValueRet) const
std::vector<COutput> vCoins;
AvailableCoins(vCoins, true, NULL, false, ONLY_PRIVATESEND_COLLATERAL);
AvailableCoins(vCoins, true, NULL, 0, MAX_MONEY, MAX_MONEY, 0, false, ONLY_PRIVATESEND_COLLATERAL);
if (vCoins.empty()) {
return false;
@ -3236,7 +3236,7 @@ bool CWallet::GetMasternodeOutpointAndKeys(COutPoint& outpointRet, CPubKey& pubK
// Find possible candidates
std::vector<COutput> vPossibleCoins;
AvailableCoins(vPossibleCoins, true, NULL, false, ONLY_1000);
AvailableCoins(vPossibleCoins, true, NULL, 0, MAX_MONEY, MAX_MONEY, 0, false, ONLY_1000);
if(vPossibleCoins.empty()) {
LogPrintf("CWallet::GetMasternodeOutpointAndKeys -- Could not locate any valid masternode vin\n");
return false;
@ -3307,7 +3307,7 @@ int CWallet::CountInputsWithAmount(CAmount nInputAmount) const
bool CWallet::HasCollateralInputs(bool fOnlyConfirmed) const
{
std::vector<COutput> vCoins;
AvailableCoins(vCoins, fOnlyConfirmed, NULL, false, ONLY_PRIVATESEND_COLLATERAL);
AvailableCoins(vCoins, fOnlyConfirmed, NULL, 0, MAX_MONEY, MAX_MONEY, 0, false, ONLY_PRIVATESEND_COLLATERAL);
return !vCoins.empty();
}
@ -3476,7 +3476,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT
LOCK2(cs_main, cs_wallet);
{
std::vector<COutput> vAvailableCoins;
AvailableCoins(vAvailableCoins, true, coinControl, false, nCoinType, fUseInstantSend);
AvailableCoins(vAvailableCoins, true, coinControl, 0, MAX_MONEY, MAX_MONEY, 0, false, nCoinType, fUseInstantSend);
int nInstantSendConfirmationsRequired = Params().GetConsensus().nInstantSendConfirmationsRequired;
nFeeRet = 0;