fix bug introduced in #1695 (#1714)

This commit is contained in:
UdjinM6 2017-11-03 23:04:47 +03:00 committed by GitHub
parent 2144dae915
commit 8591448094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2439,7 +2439,7 @@ static void ApproximateBestSubset(vector<pair<CAmount, pair<const CWalletTx*,uns
{
for (unsigned int i = 0; i < vValue.size(); i++)
{
if (fUseInstantSend && nTotal + vValue[i].first > sporkManager.GetSporkValue(SPORK_5_INSTANTSEND_MAX_VALUE)) {
if (fUseInstantSend && nTotal + vValue[i].first > sporkManager.GetSporkValue(SPORK_5_INSTANTSEND_MAX_VALUE)*COIN) {
continue;
}
//The solver here uses a randomized algorithm,
@ -2504,7 +2504,7 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int
// List of values less than target
pair<CAmount, pair<const CWalletTx*,unsigned int> > coinLowestLarger;
coinLowestLarger.first = fUseInstantSend
? sporkManager.GetSporkValue(SPORK_5_INSTANTSEND_MAX_VALUE)
? sporkManager.GetSporkValue(SPORK_5_INSTANTSEND_MAX_VALUE)*COIN
: std::numeric_limits<CAmount>::max();
coinLowestLarger.second.first = NULL;
vector<pair<CAmount, pair<const CWalletTx*,unsigned int> > > vValue;