diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2017-02-16 14:22:18 +0100 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2018-07-12 10:30:21 +0100 |
commit | 9995a602a639b64a749545b7c3bafbf67f97324f (patch) | |
tree | 2fd0c1cf77980214e7190642c842d1603f0ee530 /src/wallet/wallet.h | |
parent | 5ba77df15de92deb35bfd501d4635aed3236af30 (diff) |
Add facility to store wallet flags (64 bits)
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r-- | src/wallet/wallet.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index ef03a1eaed..c88fbe8b96 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -723,6 +723,7 @@ private: std::set<int64_t> set_pre_split_keypool; int64_t m_max_keypool_index = 0; std::map<CKeyID, int64_t> m_pool_key_to_index; + std::atomic<uint64_t> m_wallet_flags{0}; int64_t nTimeFirstKey = 0; @@ -1190,6 +1191,15 @@ public: /** Whether a given output is spendable by this wallet */ bool OutputEligibleForSpending(const COutput& output, const CoinEligibilityFilter& eligibility_filter) const; + + /** set a single wallet flag */ + void SetWalletFlag(uint64_t flags); + + /** check if a certain wallet flag is set */ + bool IsWalletFlagSet(uint64_t flag); + + /** overwrite all flags by the given uint64_t */ + void SetWalletFlags(uint64_t overwriteFlags, bool memOnly); }; /** A key allocated from the key pool. */ |