aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/coinselection.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2018-03-05 16:29:37 -0500
committerAndrew Chow <achow101-github@achow101.com>2018-03-13 12:39:17 -0400
commit0185939be6f7c5554b864e33657ce610fd434e18 (patch)
tree638323d15efce6c4768ea6c79d41ab3cd1a50925 /src/wallet/coinselection.h
parentf84fed8eb6a8518a54a997044e55332dd37e223d (diff)
downloadbitcoin-0185939be6f7c5554b864e33657ce610fd434e18.tar.xz
Implement Branch and Bound coin selection in a new file
Create a new file for coin selection logic and implement the BnB algorithm in it.
Diffstat (limited to 'src/wallet/coinselection.h')
-rw-r--r--src/wallet/coinselection.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wallet/coinselection.h b/src/wallet/coinselection.h
new file mode 100644
index 0000000000..a98f1cc7c1
--- /dev/null
+++ b/src/wallet/coinselection.h
@@ -0,0 +1,15 @@
+// Copyright (c) 2017 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_COINSELECTION_H
+#define BITCOIN_COINSELECTION_H
+
+#include <amount.h>
+#include <primitives/transaction.h>
+#include <random.h>
+#include <wallet/wallet.h>
+
+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);
+
+#endif // BITCOIN_COINSELECTION_H