mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-02 15:32:34 +02:00
Refactor: Move SetWalletFlag out of LegacyScriptPubKeyMan::UpgradeKeyMetadata
This commit does not change behavior.
This commit is contained in:
parent
769acef857
commit
4c5491f99c
@ -320,8 +320,6 @@ void LegacyScriptPubKeyMan::UpgradeKeyMetadata()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
batch.reset(); //write before setting the flag
|
|
||||||
m_storage.SetWalletFlag(WALLET_FLAG_KEY_ORIGIN_METADATA);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LegacyScriptPubKeyMan::IsHDEnabled() const
|
bool LegacyScriptPubKeyMan::IsHDEnabled() const
|
||||||
|
@ -249,10 +249,15 @@ const CWalletTx* CWallet::GetWalletTx(const uint256& hash) const
|
|||||||
|
|
||||||
void CWallet::UpgradeKeyMetadata()
|
void CWallet::UpgradeKeyMetadata()
|
||||||
{
|
{
|
||||||
|
if (IsLocked() || IsWalletFlagSet(WALLET_FLAG_KEY_ORIGIN_METADATA)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_spk_man) {
|
if (m_spk_man) {
|
||||||
AssertLockHeld(m_spk_man->cs_wallet);
|
AssertLockHeld(m_spk_man->cs_wallet);
|
||||||
m_spk_man->UpgradeKeyMetadata();
|
m_spk_man->UpgradeKeyMetadata();
|
||||||
}
|
}
|
||||||
|
SetWalletFlag(WALLET_FLAG_KEY_ORIGIN_METADATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CWallet::Unlock(const SecureString& strWalletPassphrase, bool accept_no_keys)
|
bool CWallet::Unlock(const SecureString& strWalletPassphrase, bool accept_no_keys)
|
||||||
|
Loading…
Reference in New Issue
Block a user