1 // Copyright (c) 2011-2013 The Bitcoin developers
2 // Distributed under the MIT/X11 software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_COINCONTROL_H
6 #define BITCOIN_COINCONTROL_H
8 #include "primitives/transaction.h"
10 /** Coin Control Features. */
14 CTxDestination destChange;
23 destChange = CNoDestination();
27 bool HasSelected() const
29 return (setSelected.size() > 0);
32 bool IsSelected(const uint256& hash, unsigned int n) const
34 COutPoint outpt(hash, n);
35 return (setSelected.count(outpt) > 0);
38 void Select(const COutPoint& output)
40 setSelected.insert(output);
43 void UnSelect(const COutPoint& output)
45 setSelected.erase(output);
53 void ListSelected(std::vector<COutPoint>& vOutpoints)
55 vOutpoints.assign(setSelected.begin(), setSelected.end());
59 std::set<COutPoint> setSelected;
62 #endif // BITCOIN_COINCONTROL_H