Bitcoin Core 31.99.0
P2P Digital Currency
Classes | Macros
validationinterface.cpp File Reference
#include <validationinterface.h>
#include <chain.h>
#include <consensus/validation.h>
#include <kernel/mempool_entry.h>
#include <kernel/mempool_removal_reason.h>
#include <kernel/types.h>
#include <primitives/block.h>
#include <primitives/transaction.h>
#include <util/check.h>
#include <util/log.h>
#include <util/task_runner.h>
#include <future>
#include <memory>
#include <unordered_map>
#include <utility>
Include dependency graph for validationinterface.cpp:

Go to the source code of this file.

Classes

class  ValidationSignalsImpl
 ValidationSignalsImpl manages a list of shared_ptr<CValidationInterface> callbacks. More...
 
struct  ValidationSignalsImpl::ListEntry
 List entries consist of a callback pointer and reference count. More...
 

Macros

#define ENQUEUE_AND_LOG_EVENT(event, log_msg)
 
#define LOG_MSG(fmt, ...)    (ShouldLog(BCLog::VALIDATION, BCLog::Level::Debug) ? tfm::format((fmt), __VA_ARGS__) : std::string{})
 
#define LOG_EVENT(fmt, ...)    LogDebug(BCLog::VALIDATION, fmt, __VA_ARGS__)
 

Macro Definition Documentation

◆ ENQUEUE_AND_LOG_EVENT

#define ENQUEUE_AND_LOG_EVENT (   event,
  log_msg 
)
Value:
do { \
static_assert(std::is_rvalue_reference_v<decltype((event))>, \
"event must be passed as an rvalue"); \
static_assert(std::is_rvalue_reference_v<decltype((log_msg))>, \
"log_msg must be passed as an rvalue"); \
auto enqueue_log_msg = (log_msg); \
LOG_EVENT("Enqueuing %s", enqueue_log_msg); \
m_internals->m_task_runner->insert([local_log_msg = std::move(enqueue_log_msg), local_event = (event)] { \
LOG_EVENT("%s", local_log_msg); \
local_event(); \
}); \
} while (0)

Definition at line 159 of file validationinterface.cpp.

◆ LOG_EVENT

#define LOG_EVENT (   fmt,
  ... 
)     LogDebug(BCLog::VALIDATION, fmt, __VA_ARGS__)

Definition at line 176 of file validationinterface.cpp.

◆ LOG_MSG

#define LOG_MSG (   fmt,
  ... 
)     (ShouldLog(BCLog::VALIDATION, BCLog::Level::Debug) ? tfm::format((fmt), __VA_ARGS__) : std::string{})

Definition at line 173 of file validationinterface.cpp.