From 8077862c5e8a3ed501f0baabc33536eb16922ceb Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 18 Oct 2021 15:27:27 -0400 Subject: 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). --- src/wallet/scriptpubkeyman.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/wallet/scriptpubkeyman.h') diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index ebe064fa0a..e97f0bb40c 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -354,6 +354,7 @@ private: */ bool TopUpInactiveHDChain(const CKeyID seed_id, int64_t index, bool internal); + bool TopUpChain(CHDChain& chain, unsigned int size); public: using ScriptPubKeyMan::ScriptPubKeyMan; -- cgit v1.2.3