mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-28 00:16:04 +01:00
Refactor: Move SetupGeneration code out of CWallet
This commit does not change behavior.
This commit is contained in:
@@ -339,6 +339,19 @@ void LegacyScriptPubKeyMan::UpgradeKeyMetadata()
|
||||
}
|
||||
}
|
||||
|
||||
bool LegacyScriptPubKeyMan::SetupGeneration(bool force)
|
||||
{
|
||||
if ((CanGenerateKeys() && !force) || m_storage.IsLocked()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
SetHDSeed(GenerateNewSeed());
|
||||
if (!NewKeyPool()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LegacyScriptPubKeyMan::IsHDEnabled() const
|
||||
{
|
||||
return !hdChain.seed_id.IsNull();
|
||||
|
||||
Reference in New Issue
Block a user