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.
This commit is contained in:
committed by
lateminer
parent
e94e583f48
commit
77ea5eb519
@@ -2293,16 +2293,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,
|
||||
|
||||
Reference in New Issue
Block a user