aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/scriptpubkeyman.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2019-12-05 15:55:49 -0500
committerAndrew Chow <achow101-github@achow101.com>2020-05-15 18:00:10 -0400
commitc93082ece40b1c72f05b3e2085c022c09eaa4d65 (patch)
tree2f0878258ebfa58bfbad40f3466c57ae6a34435b /src/wallet/scriptpubkeyman.h
parent45f2f6a0e8514a0438a87554400bf73cbb90707f (diff)
downloadbitcoin-c93082ece40b1c72f05b3e2085c022c09eaa4d65.tar.xz
Generate new keys for inactive seeds after marking used
When a key from an inactive seed is used, generate replacements to fill a keypool that would have been there.
Diffstat (limited to 'src/wallet/scriptpubkeyman.h')
-rw-r--r--src/wallet/scriptpubkeyman.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h
index 0f43564748..5aaa17334c 100644
--- a/src/wallet/scriptpubkeyman.h
+++ b/src/wallet/scriptpubkeyman.h
@@ -333,6 +333,18 @@ private:
*/
bool ReserveKeyFromKeyPool(int64_t& nIndex, CKeyPool& keypool, bool fRequestedInternal);
+ /**
+ * Like TopUp() but adds keys for inactive HD chains.
+ * Ensures that there are at least -keypool number of keys derived after the given index.
+ *
+ * @param seed_id the CKeyID for the HD seed.
+ * @param index the index to start generating keys from
+ * @param internal whether the internal chain should be used. true for internal chain, false for external chain.
+ *
+ * @return true if seed was found and keys were derived. false if unable to derive seeds
+ */
+ bool TopUpInactiveHDChain(const CKeyID seed_id, int64_t index, bool internal);
+
public:
using ScriptPubKeyMan::ScriptPubKeyMan;