32 #include "daemon/daemon.h" 64 return cryptonote::core_rpc_server::handle_http_request_map(
query_info, response_info, m_conn_context);
79 static constexpr
const std::chrono::seconds rpc_timeout = std::chrono::seconds(60);
90 boost::program_options::variables_map
m_vm;
103 boost::program_options::variables_map
const & vm
109 , m_terminated(
false)
110 , m_deinitalized(
false)
113 , m_server{m_protocol}
114 , m_rpc_server{*core, m_server}
124 static void init_options(boost::program_options::options_description & option_spec);
125 static void default_options(boost::program_options::variables_map & vm);
126 static void set_ports(boost::program_options::variables_map & vm,
unsigned initial_port);
139 void stop_and_deinit();
140 void try_init_and_run(boost::optional<unsigned> initial_port=boost::none);
143 void start_mining(
const std::string &miner_address,
uint64_t threads_count=1,
bool do_background_mining=
false,
bool ignore_battery=
true);
147 void load_params(boost::program_options::variables_map
const & vm);
std::atomic< bool > m_stopped
CHAIN_HTTP_TO_MAP2(cryptonote::core_rpc_server::connection_context)
mock_daemon * set_start_zmq(bool fl)
boost::thread m_run_thread
void set_p2p_endpoint(nodetool::i_p2p_endpoint< connection_context > *p2p)
epee::misc_utils::struct_init< response_t > response
static void init_options(boost::program_options::options_description &desc)
cryptonote::t_cryptonote_protocol_handler< cryptonote::core > t_protocol_raw
std::atomic< bool > m_terminated
uint64_t num_blocks(const std::vector< test_event_entry > &events)
bool init(const boost::program_options::variables_map &vm, const bool restricted, const std::string &port)
cryptonote::network_type m_network_type
std::atomic< bool > m_deinitalized
std::string m_zmq_bind_port
mock_daemon * set_start_p2p(bool fl)
cryptonote::core * m_core
core_rpc_server(core &cr, nodetool::node_server< cryptonote::t_cryptonote_protocol_handler< cryptonote::core > > &p2p)
cryptonote::network_type m_network_type
cryptonote::network_type nettype() const
Holds cryptonote related classes and helpers.
void set_cryptonote_protocol(i_cryptonote_protocol *pprotocol)
set the pointer to the cryptonote protocol object to use
std::string p2p_addr() const
handles core cryptonote functionality
unsigned __int64 uint64_t
epee::net_utils::http::http_simple_client m_http_client
nodetool::node_server< t_protocol_raw > t_node_server
std::string m_rpc_bind_port
bool run(size_t threads_count, bool wait=true)
const command_line::arg_descriptor< bool > arg_offline
std::string m_p2p_bind_port
epee::net_utils::connection_context_base connection_context
T get_arg(const boost::program_options::variables_map &vm, const arg_descriptor< T, false, true > &arg)
t_protocol_raw m_protocol
void nettype(cryptonote::network_type nettype)
cryptonote::network_type nettype() const
#define MAP_URI_AUTO_JON2(s_pattern, callback_f, command_type)
std::string rpc_addr() const
mock_rpc_daemon(cryptonote::core &cr, nodetool::node_server< cryptonote::t_cryptonote_protocol_handler< cryptonote::core > > &p2p)
mock_daemon(cryptonote::core *core, boost::program_options::variables_map const &vm)
static void init_options(boost::program_options::options_description &desc)
std::string zmq_addr() const
bool on_send_raw_tx_2(const cryptonote::COMMAND_RPC_SEND_RAW_TX::request &req, cryptonote::COMMAND_RPC_SEND_RAW_TX::response &res, const cryptonote::core_rpc_server::connection_context *ctx)
cryptonote::core * core() const
mock_rpc_daemon m_rpc_server
boost::program_options::variables_map m_vm