diff options
author | Andrew Chow <achow101-github@achow101.com> | 2018-03-09 22:51:39 -0500 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2018-03-13 12:39:26 -0400 |
commit | fb716f7b25927e377f73b904a88ab67facfe3e55 (patch) | |
tree | 80dd5c4d3fb2c13031611f2ab5f11e23c8510e45 /src/wallet/coinselection.h | |
parent | 4566ab75f277612425337bf7786c1d3a410d894a (diff) |
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.h | 2 |
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 |