fix: isHDenabled is true only when chain is generated; before that's always false

This commit is contained in:
Konstantin Akimov 2024-02-29 03:30:47 +07:00
parent ce992f7a3a
commit 31040abae6
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524
2 changed files with 2 additions and 5 deletions

View File

@ -29,10 +29,7 @@ static void WalletCreate(CWallet* wallet_instance)
// generate a new HD seed
wallet_instance->SetupLegacyScriptPubKeyMan();
auto spk_man = wallet_instance->GetLegacyScriptPubKeyMan();
// NOTE: drop this condition after removing option to create non-HD wallets
if (spk_man->IsHDEnabled()) {
spk_man->GenerateNewHDChain(/*secureMnemonic=*/"", /*secureMnemonicPassphrase=*/"");
}
spk_man->GenerateNewHDChain(/*secureMnemonic=*/"", /*secureMnemonicPassphrase=*/"");
tfm::format(std::cout, "Topping up keypool...\n");
wallet_instance->TopUpKeyPool();

View File

@ -208,7 +208,7 @@ class ToolWalletTest(BitcoinTestFramework):
Descriptors: no
Encrypted: no
HD (hd seed available): no
Keypool Size: 1000
Keypool Size: 2000
Transactions: 0
Address Book: 0
''')