aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/walletdb.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2021-10-18 15:27:27 -0400
committerAndrew Chow <achow101-github@achow101.com>2022-01-14 15:03:15 -0500
commit8077862c5e8a3ed501f0baabc33536eb16922ceb (patch)
tree5affda338dde813a50971d6ad31b67d5766c6c24 /src/wallet/walletdb.h
parent70134eb34f58f0c572e7c3775e292d408f03b5ab (diff)
downloadbitcoin-8077862c5e8a3ed501f0baabc33536eb16922ceb.tar.xz
wallet: Refactor TopUp to be able to top up inactive chains too
Refactors TopUp so that it also tops up inactive chains. The bulk of TopUp is moved to TopUpChain. CHDChain also has 2 new in memory variables to track its highest used indexes. This is used only for inactive hd chains so that they can be topped up later in the same session (e.g. if the wallet is encrypted and not unlocked at the time of MarkUnusedAddresses).
Diffstat (limited to 'src/wallet/walletdb.h')
-rw-r--r--src/wallet/walletdb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h
index 9c752623b3..428f3d36ec 100644
--- a/src/wallet/walletdb.h
+++ b/src/wallet/walletdb.h
@@ -90,6 +90,8 @@ public:
uint32_t nExternalChainCounter;
uint32_t nInternalChainCounter;
CKeyID seed_id; //!< seed hash160
+ int64_t m_next_external_index{0}; // Next index in the keypool to be used. Memory only.
+ int64_t m_next_internal_index{0}; // Next index in the keypool to be used. Memory only.
static const int VERSION_HD_BASE = 1;
static const int VERSION_HD_CHAIN_SPLIT = 2;