Bitcoin Core 32.99.0
P2P Digital Currency
Loading...
Searching...
No Matches
common.h
Go to the documentation of this file.
1// Copyright (c) The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef MP_TEST_COMMON_H
6#define MP_TEST_COMMON_H
7
8#include <kj/debug.h>
9#include <mp/proxy-io.h>
10
11#include <stdexcept>
12
13namespace mp {
14namespace test {
15
19{
20 KJ_LOG(INFO, log.level, log.message);
21 if (log.level == Log::Raise) throw std::runtime_error(log.message);
22}
23
24} // namespace test
25} // namespace mp
26
27#endif // MP_TEST_COMMON_H
void DefaultLogHandler(LogMessage log)
Default event loop log handler used by tests.
Definition common.h:18
Functions to serialize / deserialize common bitcoin types.
Log level
The severity level of this message.
Definition proxy-io.h:150
std::string message
Message to be logged.
Definition proxy-io.h:147
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition time.h:82