Switch from epee http server to boost::beast http server. Min boost 1.70 (#136)

There is roughly a 7.4% increase in performance in the switch to
boost::beast. Additionally, the REST endpoints `/daemon_status`,
`/get_unspent_outs`, and `/submit_raw_tx` do not block in ZMQ calls,
allowing for better response times regardless of `monerod` status.

The REST endpoints `/login and `/get_random_outs` still need updates
to prevent blocking (`/login` is conditional on DB state).
This commit is contained in:
Lee *!* Clagett
2024-10-23 11:31:03 -04:00
committed by Lee *!* Clagett
parent 8080159fc8
commit 075dc5d7c2
15 changed files with 1525 additions and 411 deletions

View File

@@ -34,6 +34,7 @@
#include <stdexcept>
#include <type_traits>
#include "config.h"
#include "db/string.h"
#include "error.h"
#include "time_helper.h" // monero/contrib/epee/include
@@ -198,6 +199,14 @@ namespace lws
namespace rpc
{
daemon_status_response::daemon_status_response()
: outgoing_connections_count(0),
incoming_connections_count(0),
height(0),
network(lws::rpc::network_type(lws::config::network)),
state(daemon_state::unavailable)
{}
namespace
{
constexpr const char* map_daemon_state[] = {"ok", "no_connections", "synchronizing", "unavailable"};