Browse Source

Merge #8324: [Wallet] keep HD seed during salvagewallet

b993671 [Wallet] keep HD seed during salvagewallet (Jonas Schnelli)
0.13
Wladimir J. van der Laan 8 years ago
parent
commit
bc94b87487
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 2
      src/wallet/wallet.cpp
  2. 2
      src/wallet/walletdb.cpp

2
src/wallet/wallet.cpp

@ -3291,7 +3291,7 @@ bool CWallet::InitLoadWallet() @@ -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);

2
src/wallet/walletdb.cpp

@ -977,7 +977,7 @@ bool CWalletDB::Recover(CDBEnv& dbenv, const std::string& filename, bool fOnlyKe @@ -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…
Cancel
Save