Permalink
Browse files

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

b993671 [Wallet] keep HD seed during salvagewallet (Jonas Schnelli)
  • Loading branch information...
laanwj committed Jul 14, 2016
2 parents af9b7a9 + b993671 commit bc94b87487824c6fba45788facf96faba97a4aa6
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/wallet/wallet.cpp
  2. +1 −1 src/wallet/walletdb.cpp
View
@@ -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);
View
@@ -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)
{

0 comments on commit bc94b87

Please sign in to comment.