[0.13] Create a new HD seed after encrypting the wallet
This commit is contained in:
@@ -626,6 +626,15 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
|
||||
|
||||
Lock();
|
||||
Unlock(strWalletPassphrase);
|
||||
|
||||
// if we are using HD, replace the HD master key with a new one
|
||||
if (!hdChain.masterKeyID.IsNull()) {
|
||||
CKey key;
|
||||
key.MakeNewKey(true);
|
||||
if (!SetHDMasterKey(key))
|
||||
return false;
|
||||
}
|
||||
|
||||
NewKeyPool();
|
||||
Lock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user