Monero
Loading...
Searching...
No Matches
cryptonote::bootstrap_daemon Class Reference

#include <bootstrap_daemon.h>

Collaboration diagram for cryptonote::bootstrap_daemon:

Public Member Functions

 bootstrap_daemon (std::function< std::map< std::string, bool >()> get_public_nodes, bool rpc_payment_enabled, const std::string &proxy)
 bootstrap_daemon (const std::string &address, boost::optional< epee::net_utils::http::login > credentials, bool rpc_payment_enabled, const std::string &proxy)
std::string address () const noexcept
boost::optional< std::pair< uint64_t, uint64_t > > get_height ()
bool handle_result (bool success, const std::string &status)
template<class t_request, class t_response>
bool invoke_http_json (const boost::string_ref uri, const t_request &out_struct, t_response &result_struct)
template<class t_request, class t_response>
bool invoke_http_bin (const boost::string_ref uri, const t_request &out_struct, t_response &result_struct)
template<class t_request, class t_response>
bool invoke_http_json_rpc (const boost::string_ref command_name, const t_request &out_struct, t_response &result_struct)
void set_proxy (const std::string &address)

Private Member Functions

bool set_server (const std::string &address, const boost::optional< epee::net_utils::http::login > &credentials=boost::none)
bool switch_server_if_needed ()

Private Attributes

net::http::client m_http_client
const bool m_rpc_payment_enabled
const std::unique_ptr< bootstrap_node::selectorm_selector
boost::mutex m_selector_mutex

Constructor & Destructor Documentation

◆ bootstrap_daemon() [1/2]

cryptonote::bootstrap_daemon::bootstrap_daemon ( std::function< std::map< std::string, bool >()> get_public_nodes,
bool rpc_payment_enabled,
const std::string & proxy )

◆ bootstrap_daemon() [2/2]

cryptonote::bootstrap_daemon::bootstrap_daemon ( const std::string & address,
boost::optional< epee::net_utils::http::login > credentials,
bool rpc_payment_enabled,
const std::string & proxy )

Member Function Documentation

◆ address()

std::string cryptonote::bootstrap_daemon::address ( ) const
noexcept

◆ get_height()

boost::optional< std::pair< uint64_t, uint64_t > > cryptonote::bootstrap_daemon::get_height ( )

◆ handle_result()

bool cryptonote::bootstrap_daemon::handle_result ( bool success,
const std::string & status )

◆ invoke_http_bin()

template<class t_request, class t_response>
bool cryptonote::bootstrap_daemon::invoke_http_bin ( const boost::string_ref uri,
const t_request & out_struct,
t_response & result_struct )
inline

◆ invoke_http_json()

template<class t_request, class t_response>
bool cryptonote::bootstrap_daemon::invoke_http_json ( const boost::string_ref uri,
const t_request & out_struct,
t_response & result_struct )
inline

◆ invoke_http_json_rpc()

template<class t_request, class t_response>
bool cryptonote::bootstrap_daemon::invoke_http_json_rpc ( const boost::string_ref command_name,
const t_request & out_struct,
t_response & result_struct )
inline

◆ set_proxy()

void cryptonote::bootstrap_daemon::set_proxy ( const std::string & address)

◆ set_server()

bool cryptonote::bootstrap_daemon::set_server ( const std::string & address,
const boost::optional< epee::net_utils::http::login > & credentials = boost::none )
private

◆ switch_server_if_needed()

bool cryptonote::bootstrap_daemon::switch_server_if_needed ( )
private

Member Data Documentation

◆ m_http_client

net::http::client cryptonote::bootstrap_daemon::m_http_client
private

◆ m_rpc_payment_enabled

const bool cryptonote::bootstrap_daemon::m_rpc_payment_enabled
private

◆ m_selector

const std::unique_ptr<bootstrap_node::selector> cryptonote::bootstrap_daemon::m_selector
private

◆ m_selector_mutex

boost::mutex cryptonote::bootstrap_daemon::m_selector_mutex
private

The documentation for this class was generated from the following files: