Skip to content

Commit

Permalink
Add GUARDED_BY(cs_wallet) for setExternalKeyPool, mapKeyMetadata, m_s…
Browse files Browse the repository at this point in the history
…cript_metadata and setLockedCoins
  • Loading branch information
practicalswift committed Oct 9, 2018
1 parent 37b2538 commit 69e7ee2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/wallet/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ class CWallet final : public CCryptoKeyStore, public CValidationInterface
void DeriveNewChildKey(WalletBatch &batch, CKeyMetadata& metadata, CKey& secret, bool internal = false) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);

std::set<int64_t> setInternalKeyPool;
std::set<int64_t> setExternalKeyPool;
std::set<int64_t> setExternalKeyPool GUARDED_BY(cs_wallet);
std::set<int64_t> set_pre_split_keypool;
int64_t m_max_keypool_index GUARDED_BY(cs_wallet) = 0;
std::map<CKeyID, int64_t> m_pool_key_to_index;
Expand Down Expand Up @@ -726,13 +726,13 @@ class CWallet final : public CCryptoKeyStore, public CValidationInterface
const std::string& GetName() const { return m_name; }

void LoadKeyPool(int64_t nIndex, const CKeyPool &keypool) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
void MarkPreSplitKeys();
void MarkPreSplitKeys() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);

// Map from Key ID to key metadata.
std::map<CKeyID, CKeyMetadata> mapKeyMetadata;
std::map<CKeyID, CKeyMetadata> mapKeyMetadata GUARDED_BY(cs_wallet);

// Map from Script ID to key metadata (for watch-only keys).
std::map<CScriptID, CKeyMetadata> m_script_metadata;
std::map<CScriptID, CKeyMetadata> m_script_metadata GUARDED_BY(cs_wallet);

typedef std::map<unsigned int, CMasterKey> MasterKeyMap;
MasterKeyMap mapMasterKeys;
Expand All @@ -759,7 +759,7 @@ class CWallet final : public CCryptoKeyStore, public CValidationInterface

std::map<CTxDestination, CAddressBookData> mapAddressBook;

std::set<COutPoint> setLockedCoins;
std::set<COutPoint> setLockedCoins GUARDED_BY(cs_wallet);

const CWalletTx* GetWalletTx(const uint256& hash) const;

Expand Down

0 comments on commit 69e7ee2

Please sign in to comment.