aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/coinselection.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2018-03-09 22:51:39 -0500
committerAndrew Chow <achow101-github@achow101.com>2018-03-13 12:39:26 -0400
commitfb716f7b25927e377f73b904a88ab67facfe3e55 (patch)
tree80dd5c4d3fb2c13031611f2ab5f11e23c8510e45 /src/wallet/coinselection.h
parent4566ab75f277612425337bf7786c1d3a410d894a (diff)
downloadbitcoin-fb716f7b25927e377f73b904a88ab67facfe3e55.tar.xz
Move current coin selection algorithm to coinselection.{cpp,h}
Moves the current coin selection algorithm out of SelectCoinsMinConf and puts it in coinselection.{cpp,h}. The new function, KnapsackSolver, instead of taking a vector of COutputs, will take a vector of CInputCoins that is prepared by SelectCoinsMinConf.
Diffstat (limited to 'src/wallet/coinselection.h')
-rw-r--r--src/wallet/coinselection.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/coinselection.h b/src/wallet/coinselection.h
index bbfa08a242..4d1a43bc17 100644
--- a/src/wallet/coinselection.h
+++ b/src/wallet/coinselection.h
@@ -49,4 +49,6 @@ public:
bool SelectCoinsBnB(std::vector<CInputCoin>& utxo_pool, const CAmount& target_value, const CAmount& cost_of_change, std::set<CInputCoin>& out_set, CAmount& value_ret, CAmount not_input_fees);
+// Original coin selection algorithm as a fallback
+bool KnapsackSolver(const CAmount& nTargetValue, std::vector<CInputCoin>& vCoins, std::set<CInputCoin>& setCoinsRet, CAmount& nValueRet);
#endif // BITCOIN_COINSELECTION_H