@@ -65,8 +65,8 @@ const uint256 CMerkleTx::ABANDON_HASH(uint256S("00000000000000000000000000000000
65
65
66
66
struct CompareValueOnly
67
67
{
68
- bool operator ()(const std::pair<CAmount, std::pair< const CWalletTx*, unsigned int > >& t1,
69
- const std::pair<CAmount, std::pair< const CWalletTx*, unsigned int > >& t2) const
68
+ bool operator ()(const std::pair<CAmount, CInputCoin >& t1,
69
+ const std::pair<CAmount, CInputCoin >& t2) const
70
70
{
71
71
return t1.first < t2.first ;
72
72
}
@@ -2032,7 +2032,7 @@ void CWallet::AvailableCoins(std::vector<COutput>& vCoins, bool fOnlySafe, const
2032
2032
}
2033
2033
}
2034
2034
2035
- static void ApproximateBestSubset (const std::vector<std::pair<CAmount, std::pair< const CWalletTx*, unsigned int > > >& vValue, const CAmount& nTotalLower, const CAmount& nTargetValue,
2035
+ static void ApproximateBestSubset (const std::vector<std::pair<CAmount, CInputCoin > >& vValue, const CAmount& nTotalLower, const CAmount& nTargetValue,
2036
2036
std::vector<char >& vfBest, CAmount& nBest, int iterations = 1000 )
2037
2037
{
2038
2038
std::vector<char > vfIncluded;
@@ -2079,16 +2079,16 @@ static void ApproximateBestSubset(const std::vector<std::pair<CAmount, std::pair
2079
2079
}
2080
2080
2081
2081
bool CWallet::SelectCoinsMinConf (const CAmount& nTargetValue, const int nConfMine, const int nConfTheirs, const uint64_t nMaxAncestors, std::vector<COutput> vCoins,
2082
- std::set<std::pair< const CWalletTx*, unsigned int > >& setCoinsRet, CAmount& nValueRet) const
2082
+ std::set<CInputCoin >& setCoinsRet, CAmount& nValueRet) const
2083
2083
{
2084
2084
setCoinsRet.clear ();
2085
2085
nValueRet = 0 ;
2086
2086
2087
2087
// List of values less than target
2088
- std::pair<CAmount, std::pair< const CWalletTx*, unsigned int > > coinLowestLarger;
2088
+ std::pair<CAmount, CInputCoin > coinLowestLarger;
2089
2089
coinLowestLarger.first = std::numeric_limits<CAmount>::max ();
2090
2090
coinLowestLarger.second .first = NULL ;
2091
- std::vector<std::pair<CAmount, std::pair< const CWalletTx*, unsigned int > > > vValue;
2091
+ std::vector<std::pair<CAmount, CInputCoin > > vValue;
2092
2092
CAmount nTotalLower = 0 ;
2093
2093
2094
2094
random_shuffle (vCoins.begin (), vCoins.end (), GetRandInt);
@@ -2109,7 +2109,7 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, const int nConfMin
2109
2109
int i = output.i ;
2110
2110
CAmount n = pcoin->tx ->vout [i].nValue ;
2111
2111
2112
- std::pair<CAmount,std::pair< const CWalletTx*, unsigned int > > coin = std::make_pair (n,std::make_pair (pcoin, i));
2112
+ std::pair<CAmount,CInputCoin > coin = std::make_pair (n,std::make_pair (pcoin, i));
2113
2113
2114
2114
if (n == nTargetValue)
2115
2115
{
@@ -2187,7 +2187,7 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, const int nConfMin
2187
2187
return true ;
2188
2188
}
2189
2189
2190
- bool CWallet::SelectCoins (const std::vector<COutput>& vAvailableCoins, const CAmount& nTargetValue, std::set<std::pair< const CWalletTx*, unsigned int > >& setCoinsRet, CAmount& nValueRet, const CCoinControl* coinControl) const
2190
+ bool CWallet::SelectCoins (const std::vector<COutput>& vAvailableCoins, const CAmount& nTargetValue, std::set<CInputCoin >& setCoinsRet, CAmount& nValueRet, const CCoinControl* coinControl) const
2191
2191
{
2192
2192
std::vector<COutput> vCoins (vAvailableCoins);
2193
2193
@@ -2205,7 +2205,7 @@ bool CWallet::SelectCoins(const std::vector<COutput>& vAvailableCoins, const CAm
2205
2205
}
2206
2206
2207
2207
// calculate value from preset inputs and store them
2208
- std::set<std::pair< const CWalletTx*, uint32_t > > setPresetCoins;
2208
+ std::set<CInputCoin > setPresetCoins;
2209
2209
CAmount nValueFromPresetInputs = 0 ;
2210
2210
2211
2211
std::vector<COutPoint> vPresetInputs;
@@ -2395,7 +2395,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT
2395
2395
assert (txNew.nLockTime < LOCKTIME_THRESHOLD);
2396
2396
2397
2397
{
2398
- std::set<std::pair< const CWalletTx*, unsigned int > > setCoins;
2398
+ std::set<CInputCoin > setCoins;
2399
2399
LOCK2 (cs_main, cs_wallet);
2400
2400
{
2401
2401
std::vector<COutput> vAvailableCoins;
0 commit comments