mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
fix DS bug - endless collateral creation until one of them confirms
This commit is contained in:
parent
628d281209
commit
a723c2148e
@ -1462,7 +1462,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun)
|
|||||||
if(nBalanceNeedsDenominated > nOnlyDenominatedBalance) return CreateDenominated(nBalanceNeedsDenominated);
|
if(nBalanceNeedsDenominated > nOnlyDenominatedBalance) return CreateDenominated(nBalanceNeedsDenominated);
|
||||||
|
|
||||||
//check if we have the collateral sized inputs
|
//check if we have the collateral sized inputs
|
||||||
if(!pwalletMain->HasCollateralInputs()) return MakeCollateralAmounts();
|
if(!pwalletMain->HasCollateralInputs()) return !pwalletMain->HasCollateralInputs(false) && MakeCollateralAmounts();
|
||||||
|
|
||||||
std::vector<CTxOut> vOut;
|
std::vector<CTxOut> vOut;
|
||||||
|
|
||||||
|
@ -1963,10 +1963,10 @@ int CWallet::CountInputsWithAmount(int64_t nInputAmount)
|
|||||||
return nTotal;
|
return nTotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CWallet::HasCollateralInputs() const
|
bool CWallet::HasCollateralInputs(bool fOnlyConfirmed) const
|
||||||
{
|
{
|
||||||
vector<COutput> vCoins;
|
vector<COutput> vCoins;
|
||||||
AvailableCoins(vCoins);
|
AvailableCoins(vCoins, fOnlyConfirmed);
|
||||||
|
|
||||||
int nFound = 0;
|
int nFound = 0;
|
||||||
BOOST_FOREACH(const COutput& out, vCoins)
|
BOOST_FOREACH(const COutput& out, vCoins)
|
||||||
|
@ -151,7 +151,7 @@ public:
|
|||||||
bool SelectCoinsDark(int64_t nValueMin, int64_t nValueMax, std::vector<CTxIn>& setCoinsRet, int64_t& nValueRet, int nDarksendRoundsMin, int nDarksendRoundsMax) const;
|
bool SelectCoinsDark(int64_t nValueMin, int64_t nValueMax, std::vector<CTxIn>& setCoinsRet, int64_t& nValueRet, int nDarksendRoundsMin, int nDarksendRoundsMax) const;
|
||||||
bool SelectCoinsByDenominations(int nDenom, int64_t nValueMin, int64_t nValueMax, std::vector<CTxIn>& vCoinsRet, std::vector<COutput>& vCoinsRet2, int64_t& nValueRet, int nDarksendRoundsMin, int nDarksendRoundsMax);
|
bool SelectCoinsByDenominations(int nDenom, int64_t nValueMin, int64_t nValueMax, std::vector<CTxIn>& vCoinsRet, std::vector<COutput>& vCoinsRet2, int64_t& nValueRet, int nDarksendRoundsMin, int nDarksendRoundsMax);
|
||||||
bool SelectCoinsDarkDenominated(int64_t nTargetValue, std::vector<CTxIn>& setCoinsRet, int64_t& nValueRet) const;
|
bool SelectCoinsDarkDenominated(int64_t nTargetValue, std::vector<CTxIn>& setCoinsRet, int64_t& nValueRet) const;
|
||||||
bool HasCollateralInputs() const;
|
bool HasCollateralInputs(bool fOnlyConfirmed = true) const;
|
||||||
bool IsCollateralAmount(int64_t nInputAmount) const;
|
bool IsCollateralAmount(int64_t nInputAmount) const;
|
||||||
int CountInputsWithAmount(int64_t nInputAmount);
|
int CountInputsWithAmount(int64_t nInputAmount);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user