Skip to content

Commit 14b5efd

Browse files
committed
Move fDecryptionThoroughlyChecked from CWallet to LegacyScriptPubKeyMan
1 parent 97c0374 commit 14b5efd

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/wallet/scriptpubkeyman.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,8 +1396,7 @@ LegacyScriptPubKeyMan::LegacyScriptPubKeyMan(CWallet& wallet)
13961396
: ScriptPubKeyMan(wallet),
13971397
m_wallet(wallet),
13981398
cs_wallet(wallet.cs_wallet),
1399-
fUseCrypto(wallet.fUseCrypto),
1400-
fDecryptionThoroughlyChecked(wallet.fDecryptionThoroughlyChecked) {}
1399+
fUseCrypto(wallet.fUseCrypto) {}
14011400

14021401
bool LegacyScriptPubKeyMan::SetCrypted() { return m_wallet.SetCrypted(); }
14031402
bool LegacyScriptPubKeyMan::IsCrypted() const { return m_wallet.IsCrypted(); }

src/wallet/scriptpubkeyman.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ class ScriptPubKeyMan
198198
class LegacyScriptPubKeyMan : public ScriptPubKeyMan, public FillableSigningProvider
199199
{
200200
private:
201+
//! keeps track of whether Unlock has run a thorough check before
202+
bool fDecryptionThoroughlyChecked = false;
203+
201204
using WatchOnlySet = std::set<CScript>;
202205
using WatchKeyMap = std::map<CKeyID, CPubKey>;
203206

@@ -417,7 +420,6 @@ class LegacyScriptPubKeyMan : public ScriptPubKeyMan, public FillableSigningProv
417420
CWallet& m_wallet;
418421
CCriticalSection& cs_wallet;
419422
std::atomic<bool>& fUseCrypto;
420-
bool& fDecryptionThoroughlyChecked;
421423
};
422424

423425
#endif // BITCOIN_WALLET_SCRIPTPUBKEYMAN_H

src/wallet/wallet.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,6 @@ class CWallet final : public WalletStorage, private interfaces::Chain::Notificat
601601
//! if fUseCrypto is false, vMasterKey must be empty
602602
std::atomic<bool> fUseCrypto;
603603

604-
//! keeps track of whether Unlock has run a thorough check before
605-
bool fDecryptionThoroughlyChecked;
606604

607605
bool SetCrypted();
608606
bool Unlock(const CKeyingMaterial& vMasterKeyIn, bool accept_no_keys = false);
@@ -735,7 +733,6 @@ class CWallet final : public WalletStorage, private interfaces::Chain::Notificat
735733
/** Construct wallet with specified name and database implementation. */
736734
CWallet(interfaces::Chain* chain, const WalletLocation& location, std::unique_ptr<WalletDatabase> database)
737735
: fUseCrypto(false),
738-
fDecryptionThoroughlyChecked(false),
739736
m_chain(chain),
740737
m_location(location),
741738
database(std::move(database))

0 commit comments

Comments
 (0)