6#include <bitcoin-build-config.h>
26 _(
"This is a pre-release test build - use at your own risk - do not use for mining or merchant applications")});
46 std::vector<bilingual_str> messages;
47 messages.reserve(m_warnings.size());
48 for (
const auto& [
id, msg] : m_warnings) {
49 messages.push_back(msg);
63 messages.push_back(std::move(message.original));
Manages warning messages within a node.
std::variant< kernel::Warning, node::Warning > warning_type
bool Unset(warning_type id) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
Unset a warning message.
bool Set(warning_type id, bilingual_str message) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
Set a warning message.
std::vector< bilingual_str > GetMessages() const EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
Return potential problems detected by the node, sorted by the warning_type id.
CClientUIInterface uiInterface
UniValue GetWarningsForRpc(const Warnings &warnings, bool use_deprecated)
RPC helper function that wraps warnings.GetMessages().
#define WITH_LOCK(cs, code)
Run code while locking a mutex.
consteval auto _(util::TranslatedLiteral str)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.