aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-07-18 15:49:56 -0400
committerJohn Newbery <john@johnnewbery.com>2017-08-10 13:44:02 -0400
commit095142d1f93f39ad2b88dbe8d40140223a1b3900 (patch)
tree792b20cb2673c7ebc29e2ef6752cc9ad353d5f82 /src/wallet/wallet.h
parentc25d90f125d69e33688288eff439eb7be75012e9 (diff)
downloadbitcoin-095142d1f93f39ad2b88dbe8d40140223a1b3900.tar.xz
[wallet] keypool mark-used and topup
This commit adds basic keypool mark-used and topup: - try to topup the keypool on initial load - if a key in the keypool is used, mark all keys before that as used and try to top up
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 310300126d..a9b90fe9a1 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -977,6 +977,10 @@ public:
void ReturnKey(int64_t nIndex, bool fInternal, const CPubKey& pubkey);
bool GetKeyFromPool(CPubKey &key, bool internal = false);
int64_t GetOldestKeyPoolTime();
+ /**
+ * Marks all keys in the keypool up to and including reserve_key as used.
+ */
+ void MarkReserveKeysAsUsed(int64_t keypool_id);
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;