mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
wallet: Don't generate keys when privkeys disabled when upgrading
When private keys are disabled, we should not be trying to generate new keys during upgradewallet.
This commit is contained in:
parent
1e8aa02ec5
commit
3d985d4f43
1 changed files with 6 additions and 0 deletions
|
@ -469,6 +469,12 @@ bool LegacyScriptPubKeyMan::CanGetAddresses(bool internal) const
|
||||||
bool LegacyScriptPubKeyMan::Upgrade(int prev_version, int new_version, bilingual_str& error)
|
bool LegacyScriptPubKeyMan::Upgrade(int prev_version, int new_version, bilingual_str& error)
|
||||||
{
|
{
|
||||||
LOCK(cs_KeyStore);
|
LOCK(cs_KeyStore);
|
||||||
|
|
||||||
|
if (m_storage.IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
|
||||||
|
// Nothing to do here if private keys are not enabled
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool hd_upgrade = false;
|
bool hd_upgrade = false;
|
||||||
bool split_upgrade = false;
|
bool split_upgrade = false;
|
||||||
if (IsFeatureSupported(new_version, FEATURE_HD) && !IsHDEnabled()) {
|
if (IsFeatureSupported(new_version, FEATURE_HD) && !IsHDEnabled()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue