From 52781f50f67edc094fe54ad7d30576d92303f340 Mon Sep 17 00:00:00 2001 From: sairajzero Date: Sat, 11 Aug 2018 05:20:46 -0700 Subject: [PATCH] Updated SendChangeToBack feature --- src/wallet/wallet.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 25c4c8451..a144368fb 100755 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2488,14 +2488,6 @@ bool CWallet::SelectCoins(const std::vector& vAvailableCoins, const CAm nValueRet += out.tx->tx->vout[out.i].nValue; setCoinsRet.insert(CInputCoin(out.tx, out.i)); } - // address for SendChangeToBack - CAmount maxVal=0; - for (const CInputCoin &coin : setCoinsRet){ - if(coin.txout.nValue > maxVal){ - ExtractDestination(coin.txout.scriptPubKey, destChange); - maxVal = coin.txout.nValue; - } - } bool res = (nValueRet >= nTargetValue); // address for SendChangeToBack @@ -2573,9 +2565,7 @@ bool CWallet::SelectCoins(const std::vector& vAvailableCoins, const CAm ExtractDestination(coin.txout.scriptPubKey, destChange); return true; } - } - //return false since coins of required amount is not available return false; }else{ //Not FIFO Coin Control @@ -2607,7 +2597,6 @@ bool CWallet::SelectCoins(const std::vector& vAvailableCoins, const CAm } } } - return res; } }