Skip to content

Commit

Permalink
fix bug introduced in bitcoin#1695 (bitcoin#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 committed Nov 3, 2017
1 parent 2144dae commit 8591448
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 8591448

Please sign in to comment.