aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorKarl-Johan Alm <karljohan-alm@garage.co.jp>2018-09-13 13:53:19 +0900
committerKarl-Johan Alm <karljohan-alm@garage.co.jp>2019-05-29 18:40:31 +0900
commit8247a0da3a46d7c38943ee0304343ab7465305bd (patch)
treefad1d713d2e9e71438b1805dc5a0d6a795c85719 /src/wallet/wallet.h
parenteec15662fad917b169f5e3b8baaf4301dcf00a7b (diff)
downloadbitcoin-8247a0da3a46d7c38943ee0304343ab7465305bd.tar.xz
wallet: enable avoid_reuse feature
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 4ff347a596..311a5030cc 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -941,6 +941,12 @@ public:
std::set<CInputCoin>& setCoinsRet, CAmount& nValueRet, const CoinSelectionParams& coin_selection_params, bool& bnb_used) const;
bool IsSpent(interfaces::Chain::Lock& locked_chain, const uint256& hash, unsigned int n) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
+
+ // Whether this or any UTXO with the same CTxDestination has been spent.
+ bool IsUsedDestination(const CTxDestination& dst) const;
+ bool IsUsedDestination(const uint256& hash, unsigned int n) const;
+ void SetUsedDestinationState(const uint256& hash, unsigned int n, bool used);
+
std::vector<OutputGroup> GroupOutputs(const std::vector<COutput>& outputs, bool single_coin) const;
bool IsLockedCoin(uint256 hash, unsigned int n) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
@@ -1053,7 +1059,7 @@ public:
CAmount m_watchonly_untrusted_pending{0};
CAmount m_watchonly_immature{0};
};
- Balance GetBalance(int min_depth = 0) const;
+ Balance GetBalance(int min_depth = 0, bool avoid_reuse = true) const;
CAmount GetAvailableBalance(const CCoinControl* coinControl = nullptr) const;
OutputType TransactionChangeType(OutputType change_type, const std::vector<CRecipient>& vecSend);