aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-03-29 12:33:13 -0400
committerMatt Corallo <git@bluematt.me>2017-04-13 11:55:43 -0400
commit185c7f08be68eec878f4b32b3a52145dd57e13bd (patch)
treea5c8399d8b98895e71eec550e617d1f56103e111 /src/wallet/wallet.h
parentf34cdcbd806d3e7c9d5dbac2a201755a4cc9828b (diff)
Avoid reading the old hd master key during wallet encryption
This makes SetHDMasterKey responsible for maintinaing the CHDChain version instead of always creating it with the latest version and making EncryptWallet responsible for keeping the version from changing.
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index ccede60097..4e7e1b5797 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -1056,9 +1056,10 @@ public:
CPubKey GenerateNewHDMasterKey();
/* Set the current HD master key (will reset the chain child index counters)
- If possibleOldChain is provided, the parameters from the old chain (version)
- will be preserved. */
- bool SetHDMasterKey(const CPubKey& key, CHDChain *possibleOldChain = nullptr);
+ Sets the master key's version based on the current wallet version (so the
+ caller must ensure the current wallet version is correct before calling
+ this function). */
+ bool SetHDMasterKey(const CPubKey& key);
};
/** A key allocated from the key pool. */