aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-08-03 11:03:40 -0400
committerJohn Newbery <john@johnnewbery.com>2017-08-04 16:42:53 -0400
commitc25d90f125d69e33688288eff439eb7be75012e9 (patch)
tree12c42085eb6bfbe772c787e37427accb01e8edac /src/wallet/wallet.h
parentf2123e3a7bf30545967b9ceb37961976cf7d64fb (diff)
downloadbitcoin-c25d90f125d69e33688288eff439eb7be75012e9.tar.xz
[wallet] Add HasUnusedKeys() helper
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 0d2262cfe1..310300126d 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -813,7 +813,7 @@ public:
const CWalletTx* GetWalletTx(const uint256& hash) const;
//! check whether we are allowed to upgrade (or already support) to the named feature
- bool CanSupportFeature(enum WalletFeature wf) { AssertLockHeld(cs_wallet); return nWalletMaxVersion >= wf; }
+ bool CanSupportFeature(enum WalletFeature wf) const { AssertLockHeld(cs_wallet); return nWalletMaxVersion >= wf; }
/**
* populate vCoins with vector of available COutputs.
@@ -978,6 +978,8 @@ public:
bool GetKeyFromPool(CPubKey &key, bool internal = false);
int64_t GetOldestKeyPoolTime();
const std::map<CKeyID, int64_t>& GetAllReserveKeys() const { return m_pool_key_to_index; }
+ /** Does the wallet have at least min_keys in the keypool? */
+ bool HasUnusedKeys(int min_keys) const;
std::set< std::set<CTxDestination> > GetAddressGroupings();
std::map<CTxDestination, CAmount> GetAddressBalances();