mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-19 03:20:37 +00:00
[Wallet] Trivial cleanup of HD wallet changes
Github-Pull: #8443 Rebased-From: 7e5d94df1fb09ed7ee7ed50032f876972ef39489
This commit is contained in:
parent
b17a3f9e5a
commit
464dedd6ab
@ -1199,7 +1199,7 @@ CPubKey CWallet::GenerateNewHDMasterKey()
|
|||||||
|
|
||||||
// write the key&metadata to the database
|
// write the key&metadata to the database
|
||||||
if (!AddKeyPubKey(key, pubkey))
|
if (!AddKeyPubKey(key, pubkey))
|
||||||
throw std::runtime_error("CWallet::GenerateNewKey(): AddKey failed");
|
throw std::runtime_error(std::string(__func__)+": AddKeyPubKey failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return pubkey;
|
return pubkey;
|
||||||
@ -3331,7 +3331,6 @@ bool CWallet::InitLoadWallet()
|
|||||||
// Create new keyUser and set as default key
|
// Create new keyUser and set as default key
|
||||||
if (GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET) && walletInstance->hdChain.masterKeyID.IsNull()) {
|
if (GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET) && walletInstance->hdChain.masterKeyID.IsNull()) {
|
||||||
// generate a new master key
|
// generate a new master key
|
||||||
CKey key;
|
|
||||||
CPubKey masterPubKey = walletInstance->GenerateNewHDMasterKey();
|
CPubKey masterPubKey = walletInstance->GenerateNewHDMasterKey();
|
||||||
if (!walletInstance->SetHDMasterKey(masterPubKey))
|
if (!walletInstance->SetHDMasterKey(masterPubKey))
|
||||||
throw std::runtime_error("CWallet::GenerateNewKey(): Storing master key failed");
|
throw std::runtime_error("CWallet::GenerateNewKey(): Storing master key failed");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user