Add compile time checking for all cs_main runtime locking assertions

This commit is contained in:
practicalswift
2018-08-13 13:24:52 +02:00
parent f6eb85d17c
commit 9e0a514112
13 changed files with 54 additions and 52 deletions

View File

@@ -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