aboutsummaryrefslogtreecommitdiff
path: root/src/validationinterface.h
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-08-13 13:24:52 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-08-26 00:25:28 +0200
commit9e0a514112df4f2b85abf09885a8e7898b4c09ae (patch)
tree00a106e11f992cf2d0af96ed6dff415466f8c788 /src/validationinterface.h
parentf6eb85d17c6f8ed1fe043168e90d4830ab4745c3 (diff)
Add compile time checking for all cs_main runtime locking assertions
Diffstat (limited to 'src/validationinterface.h')
-rw-r--r--src/validationinterface.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/validationinterface.h b/src/validationinterface.h
index 6e96755ea3..f0374e8e78 100644
--- a/src/validationinterface.h
+++ b/src/validationinterface.h
@@ -7,10 +7,12 @@
#define BITCOIN_VALIDATIONINTERFACE_H
#include <primitives/transaction.h> // CTransaction(Ref)
+#include <sync.h>
#include <functional>
#include <memory>
+extern CCriticalSection cs_main;
class CBlock;
class CBlockIndex;
struct CBlockLocator;
@@ -51,7 +53,7 @@ void CallFunctionInValidationInterfaceQueue(std::function<void ()> func);
* });
* promise.get_future().wait();
*/
-void SyncWithValidationInterfaceQueue();
+void SyncWithValidationInterfaceQueue() LOCKS_EXCLUDED(cs_main);
/**
* Implement this to subscribe to events generated in validation