aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-04-27 21:47:27 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-04-27 21:47:29 -0400
commit3315007e03f5cc6c89a221ec7e0bc09a89858304 (patch)
tree2a489e08c129d9054f6d0495bdea20a41118bbd6 /src
parent17266a13067c061783e0428c6200985ed8872b16 (diff)
parent66dc662c8aa5d7a178451f5ad5d826552693158c (diff)
downloadbitcoin-3315007e03f5cc6c89a221ec7e0bc09a89858304.tar.xz
Merge #13077: Add compile time checking for all cs_KeyStore runtime locking assertions
66dc662c8a Add compile time checking for all cs_KeyStore runtime locking assertions (practicalswift) Pull request description: Add compile time checking for all `cs_KeyStore` runtime locking assertions. This PR is a subset of #12665. The PR was broken up to make reviewing easier. The intention is that literally all `EXCLUSIVE_LOCKS_REQUIRED`/`LOCKS_EXCLUDED`:s added in this PR should follow either directly or indirectly from `AssertLockHeld(…)`/`AssertLockNotHeld(…)`:s already existing in the repo. Consider the case where function `A(…)` contains `AssertLockHeld(cs_foo)` (without first locking `cs_foo` in `A`), and that `B(…)` calls `A(…)` (without first locking `cs_main`): * It _directly_ follows that: `A(…)` should have an `EXCLUSIVE_LOCKS_REQUIRED(cs_foo)` annotation. * It _indirectly_ follows that: `B(…)` should have an `EXCLUSIVE_LOCKS_REQUIRED(cs_foo)` annotation. Tree-SHA512: 84ee5459e7f75f9affaa4275cb760576ab0e26da8a48b9a4a59b51a25418fe4b862ba832cb01312479a8c9b0e38ee8b6c4076bcbbd73213346d09ec2057fc9f1
Diffstat (limited to 'src')
-rw-r--r--src/keystore.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/keystore.h b/src/keystore.h
index fa912cb195..c56e4751de 100644
--- a/src/keystore.h
+++ b/src/keystore.h
@@ -54,7 +54,7 @@ protected:
ScriptMap mapScripts;
WatchOnlySet setWatchOnly;
- void ImplicitlyLearnRelatedKeyScripts(const CPubKey& pubkey);
+ void ImplicitlyLearnRelatedKeyScripts(const CPubKey& pubkey) EXCLUSIVE_LOCKS_REQUIRED(cs_KeyStore);
public:
bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey) override;