Browse Source

[Wallet] Trivial cleanup of HD wallet changes

0.14
Jonas Schnelli 8 years ago
parent
commit
7e5d94df1f
No known key found for this signature in database
GPG Key ID: 29D4BCB6416F53EC
  1. 3
      src/wallet/wallet.cpp

3
src/wallet/wallet.cpp

@ -1200,7 +1200,7 @@ CPubKey CWallet::GenerateNewHDMasterKey() @@ -1200,7 +1200,7 @@ CPubKey CWallet::GenerateNewHDMasterKey()
// write the key&metadata to the database
if (!AddKeyPubKey(key, pubkey))
throw std::runtime_error("CWallet::GenerateNewKey(): AddKey failed");
throw std::runtime_error(std::string(__func__)+": AddKeyPubKey failed");
}
return pubkey;
@ -3323,7 +3323,6 @@ bool CWallet::InitLoadWallet() @@ -3323,7 +3323,6 @@ bool CWallet::InitLoadWallet()
// Create new keyUser and set as default key
if (GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET) && walletInstance->hdChain.masterKeyID.IsNull()) {
// generate a new master key
CKey key;
CPubKey masterPubKey = walletInstance->GenerateNewHDMasterKey();
if (!walletInstance->SetHDMasterKey(masterPubKey))
throw std::runtime_error("CWallet::GenerateNewKey(): Storing master key failed");

Loading…
Cancel
Save