File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -320,8 +320,6 @@ void LegacyScriptPubKeyMan::UpgradeKeyMetadata()
320
320
}
321
321
}
322
322
}
323
- batch.reset (); // write before setting the flag
324
- m_storage.SetWalletFlag (WALLET_FLAG_KEY_ORIGIN_METADATA);
325
323
}
326
324
327
325
bool LegacyScriptPubKeyMan::IsHDEnabled () const
Original file line number Diff line number Diff line change @@ -249,10 +249,15 @@ const CWalletTx* CWallet::GetWalletTx(const uint256& hash) const
249
249
250
250
void CWallet::UpgradeKeyMetadata ()
251
251
{
252
+ if (IsLocked () || IsWalletFlagSet (WALLET_FLAG_KEY_ORIGIN_METADATA)) {
253
+ return ;
254
+ }
255
+
252
256
if (m_spk_man) {
253
257
AssertLockHeld (m_spk_man->cs_wallet );
254
258
m_spk_man->UpgradeKeyMetadata ();
255
259
}
260
+ SetWalletFlag (WALLET_FLAG_KEY_ORIGIN_METADATA);
256
261
}
257
262
258
263
bool CWallet::Unlock (const SecureString& strWalletPassphrase, bool accept_no_keys)
You can’t perform that action at this time.
0 commit comments