mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Merge #8324: [Wallet] keep HD seed during salvagewallet
b993671
[Wallet] keep HD seed during salvagewallet (Jonas Schnelli)
This commit is contained in:
commit
bc94b87487
@ -3291,7 +3291,7 @@ bool CWallet::InitLoadWallet()
|
||||
if (fFirstRun)
|
||||
{
|
||||
// Create new keyUser and set as default key
|
||||
if (GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET)) {
|
||||
if (GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET) && walletInstance->hdChain.masterKeyID.IsNull()) {
|
||||
// generate a new master key
|
||||
CKey key;
|
||||
key.MakeNewKey(true);
|
||||
|
@ -977,7 +977,7 @@ bool CWalletDB::Recover(CDBEnv& dbenv, const std::string& filename, bool fOnlyKe
|
||||
fReadOK = ReadKeyValue(&dummyWallet, ssKey, ssValue,
|
||||
wss, strType, strErr);
|
||||
}
|
||||
if (!IsKeyType(strType))
|
||||
if (!IsKeyType(strType) && strType != "hdchain")
|
||||
continue;
|
||||
if (!fReadOK)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user