aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-07-01 13:22:52 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-07-01 13:26:01 +0200
commit20f3cd75f6af8f75de943fef43b4b7769746f732 (patch)
treed53ff4d012cf5f2b4535a41fc27a3a10bebe606d /src/wallet/wallet.cpp
parentda50997a3ee7d3b73180c71cd454580af49c2244 (diff)
downloadbitcoin-20f3cd75f6af8f75de943fef43b4b7769746f732.tar.xz
wallet: Revert input selection post-pruning
This reverts PR #4906, "Coinselection prunes extraneous inputs from ApproximateBestSubset". Apparently the previous behavior of slightly over-estimating the set of inputs was useful in cleaning up UTXOs. See also #7664, #7657, as well as 2016-07-01 discussion on #bitcoin-core-dev IRC.
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 87b85eeb72..a0095ebd92 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1879,16 +1879,6 @@ static void ApproximateBestSubset(vector<pair<CAmount, pair<const CWalletTx*,uns
}
}
}
-
- //Reduces the approximate best subset by removing any inputs that are smaller than the surplus of nTotal beyond nTargetValue.
- for (unsigned int i = 0; i < vValue.size(); i++)
- {
- if (vfBest[i] && (nBest - vValue[i].first) >= nTargetValue )
- {
- vfBest[i] = false;
- nBest -= vValue[i].first;
- }
- }
}
bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int nConfTheirs, vector<COutput> vCoins,