![]() |
Bitcoin Core
24.1.0
P2P Digital Currency
|
#include <validationinterface.h>#include <attributes.h>#include <chain.h>#include <consensus/validation.h>#include <logging.h>#include <primitives/block.h>#include <primitives/transaction.h>#include <scheduler.h>#include <future>#include <unordered_map>#include <utility>Go to the source code of this file.
Classes | |
| class | MainSignalsImpl |
| MainSignalsImpl manages a list of shared_ptr<CValidationInterface> callbacks. More... | |
| struct | MainSignalsImpl::ListEntry |
| List entries consist of a callback pointer and reference count. More... | |
Macros | |
| #define | ENQUEUE_AND_LOG_EVENT(event, fmt, name, ...) |
| #define | LOG_EVENT(fmt, ...) LogPrint(BCLog::VALIDATION, fmt "\n", __VA_ARGS__) |
Functions | |
| CMainSignals & | GetMainSignals () |
| void | RegisterSharedValidationInterface (std::shared_ptr< CValidationInterface > callbacks) |
| Register subscriber. More... | |
| void | RegisterValidationInterface (CValidationInterface *callbacks) |
| Register subscriber. More... | |
| void | UnregisterSharedValidationInterface (std::shared_ptr< CValidationInterface > callbacks) |
| Unregister subscriber. More... | |
| void | UnregisterValidationInterface (CValidationInterface *callbacks) |
| Unregister subscriber. More... | |
| void | UnregisterAllValidationInterfaces () |
| Unregister all subscribers. More... | |
| void | CallFunctionInValidationInterfaceQueue (std::function< void()> func) |
| Pushes a function to callback onto the notification queue, guaranteeing any callbacks generated prior to now are finished when the function is called. More... | |
| void | SyncWithValidationInterfaceQueue () |
| This is a synonym for the following, which asserts certain locks are not held: std::promise<void> promise; CallFunctionInValidationInterfaceQueue([&promise] { promise.set_value(); }); promise.get_future().wait();. More... | |
Variables | |
| static CMainSignals | g_signals |
| #define ENQUEUE_AND_LOG_EVENT | ( | event, | |
| fmt, | |||
| name, | |||
| ... | |||
| ) |
Definition at line 178 of file validationinterface.cpp.
| #define LOG_EVENT | ( | fmt, | |
| ... | |||
| ) | LogPrint(BCLog::VALIDATION, fmt "\n", __VA_ARGS__) |
Definition at line 188 of file validationinterface.cpp.
| void CallFunctionInValidationInterfaceQueue | ( | std::function< void()> | func | ) |
Pushes a function to callback onto the notification queue, guaranteeing any callbacks generated prior to now are finished when the function is called.
Be very careful blocking on func to be called if any locks are held - validation interface clients may not be able to make progress as they often wait for things like cs_main, so blocking until func is called with cs_main will result in a deadlock (that DEBUG_LOCKORDER will miss).
Definition at line 158 of file validationinterface.cpp.
| CMainSignals& GetMainSignals | ( | ) |
| void RegisterSharedValidationInterface | ( | std::shared_ptr< CValidationInterface > | callbacks | ) |
Register subscriber.
Definition at line 124 of file validationinterface.cpp.
| void RegisterValidationInterface | ( | CValidationInterface * | callbacks | ) |
Register subscriber.
Definition at line 131 of file validationinterface.cpp.
| void SyncWithValidationInterfaceQueue | ( | ) |
This is a synonym for the following, which asserts certain locks are not held: std::promise<void> promise; CallFunctionInValidationInterfaceQueue([&promise] { promise.set_value(); }); promise.get_future().wait();.
Definition at line 163 of file validationinterface.cpp.
| void UnregisterAllValidationInterfaces | ( | ) |
Unregister all subscribers.
Definition at line 150 of file validationinterface.cpp.
| void UnregisterSharedValidationInterface | ( | std::shared_ptr< CValidationInterface > | callbacks | ) |
Unregister subscriber.
Definition at line 138 of file validationinterface.cpp.
| void UnregisterValidationInterface | ( | CValidationInterface * | callbacks | ) |
Unregister subscriber.
DEPRECATED. This is not safe to use when the RPC server or main message handler thread is running.
Definition at line 143 of file validationinterface.cpp.
|
static |
Definition at line 93 of file validationinterface.cpp.
1.8.14