1 // Copyright (c) 2011-2015 The Bitcoin Core developers
2 // Distributed under the MIT 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
;
15 //! If false, allows unselected inputs, but requires all selected inputs be used
16 bool fAllowOtherInputs
;
17 //! Includes watch only addresses which match the ISMINE_WATCH_SOLVABLE criteria
19 //! Minimum absolute fee (not per kilobyte)
20 CAmount nMinimumTotalFee
;
29 destChange
= CNoDestination();
30 fAllowOtherInputs
= false;
31 fAllowWatchOnly
= false;
36 bool HasSelected() const
38 return (setSelected
.size() > 0);
41 bool IsSelected(const COutPoint
& output
) const
43 return (setSelected
.count(output
) > 0);
46 void Select(const COutPoint
& output
)
48 setSelected
.insert(output
);
51 void UnSelect(const COutPoint
& output
)
53 setSelected
.erase(output
);
61 void ListSelected(std::vector
<COutPoint
>& vOutpoints
) const
63 vOutpoints
.assign(setSelected
.begin(), setSelected
.end());
67 std::set
<COutPoint
> setSelected
;
70 #endif // BITCOIN_COINCONTROL_H