Add unit tests for chain syncing (#87)

This commit is contained in:
Lee *!* Clagett
2024-01-22 14:17:20 -05:00
committed by Lee *!* Clagett
parent c400c9ef8a
commit e477c174e2
11 changed files with 939 additions and 16 deletions

View File

@@ -31,4 +31,4 @@ set(monero-lws-rpc_headers admin.h client.h daemon_pub.h daemon_zmq.h fwd.h json
add_library(monero-lws-rpc ${monero-lws-rpc_sources} ${monero-lws-rpc_headers})
target_include_directories(monero-lws-rpc PRIVATE ${RMQ_INCLUDE_DIR})
target_link_libraries(monero-lws-rpc monero::libraries monero-lws-wire-json monero-lws-wire-wrapper ${RMQ_LIBRARY})
target_link_libraries(monero-lws-rpc monero::libraries monero-lws-util monero-lws-wire-json monero-lws-wire-wrapper ${RMQ_LIBRARY})

View File

@@ -513,6 +513,13 @@ namespace rpc
raise_abort_process();
}
void* context::zmq_context() const
{
if (ctx == nullptr)
return nullptr;
return ctx->comm.get();
}
std::string const& context::daemon_address() const
{
if (ctx == nullptr)

View File

@@ -218,6 +218,9 @@ namespace rpc
// Do not create clone method, only one of these should exist right now.
// \return zmq context pointer (for testing).
void* zmq_context() const;
//! \return The full address of the monerod ZMQ daemon.
std::string const& daemon_address() const;