mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 05:03:16 +01:00
Refactor: Allow LegacyScriptPubKeyMan to be null
In CWallet::LoadWallet, use this to detect and empty wallet with no keys This commit does not change behavior.
This commit is contained in:
@@ -38,7 +38,7 @@ static std::shared_ptr<CWallet> CreateWallet(const std::string& name, const fs::
|
||||
wallet_instance->SetMinVersion(FEATURE_HD_SPLIT);
|
||||
|
||||
// generate a new HD seed
|
||||
auto spk_man = wallet_instance->GetLegacyScriptPubKeyMan();
|
||||
auto spk_man = wallet_instance->GetOrCreateLegacyScriptPubKeyMan();
|
||||
CPubKey seed = spk_man->GenerateNewSeed();
|
||||
spk_man->SetHDSeed(seed);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user