Skip to content

Commit

Permalink
Add missed thread safety annotations
Browse files Browse the repository at this point in the history
Summary:
This is needed for upcoming commit "sync.h: Make runtime lock checks
require compile-time lock checks" to pass.

This is a backport of [[bitcoin/bitcoin#19668 | core#19668]] [2/5]
bitcoin/bitcoin@3ddc150

Depends on D10161

Test Plan:
With TSAN:
`ninja check check-functional`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10162
  • Loading branch information
hebasto authored and PiRK committed Sep 22, 2021
1 parent 8ea2e27 commit 83cdc4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/wallet/scriptpubkeyman.h
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,8 @@ class DescriptorScriptPubKeyMan : public ScriptPubKeyMan {
bool m_decryption_thoroughly_checked = false;

bool AddDescriptorKeyWithDB(WalletBatch &batch, const CKey &key,
const CPubKey &pubkey);
const CPubKey &pubkey)
EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man);

KeyMap GetKeys() const EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man);

Expand Down
2 changes: 1 addition & 1 deletion src/wallet/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ class CWallet final : public WalletStorage,
void LoadActiveScriptPubKeyMan(uint256 id, OutputType type, bool internal);

//! Create new DescriptorScriptPubKeyMans and add them to the wallet
void SetupDescriptorScriptPubKeyMans();
void SetupDescriptorScriptPubKeyMans() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);

//! Return the DescriptorScriptPubKeyMan for a WalletDescriptor if it is
//! already in the wallet
Expand Down

0 comments on commit 83cdc4f

Please sign in to comment.