@ -9,13 +9,13 @@ namespace xmreg
rpccalls : : rpccalls (
string _d e amon_url,
string _d ae mon_url,
login_opt login ,
uint64_t _timeout )
: d e amon_url { _d e amon_url} ,
: d ae mon_url { _d ae mon_url} ,
timeout_time { _timeout }
{
epee : : net_utils : : parse_url ( d e amon_url, url ) ;
epee : : net_utils : : parse_url ( d ae mon_url, url ) ;
port = std : : to_string ( url . port ) ;
@ -23,12 +23,13 @@ rpccalls::rpccalls(
m_http_client . set_server (
deamon_url ,
login ,
epee : : net_utils : : ssl_support_t : : e_ssl_support_disabled ) ;
}
bool
rpccalls : : connect_to_monero_d e amon( )
rpccalls : : connect_to_monero_d ae mon( )
{
//std::lock_guard<std::mutex> guard(m_daemon_rpc_mutex);
@ -48,9 +49,9 @@ rpccalls::get_current_height()
std : : lock_guard < std : : mutex > guard ( m_daemon_rpc_mutex ) ;
if ( ! connect_to_monero_d e amon( ) )
if ( ! connect_to_monero_d ae mon( ) )
{
cerr < < " get_current_height: not connected to d e amon" < < endl ;
cerr < < " get_current_height: not connected to d ae mon" < < endl ;
return false ;
}
@ -60,8 +61,8 @@ rpccalls::get_current_height()
if ( ! r )
{
cerr < < " Error connecting to Monero d e amon at "
< < d e amon_url < < endl ;
cerr < < " Error connecting to Monero d ae mon at "
< < d ae mon_url < < endl ;
return 0 ;
}
@ -80,9 +81,9 @@ rpccalls::get_mempool(vector<tx_info>& mempool_txs)
{
std : : lock_guard < std : : mutex > guard ( m_daemon_rpc_mutex ) ;
if ( ! connect_to_monero_d e amon( ) )
if ( ! connect_to_monero_d ae mon( ) )
{
cerr < < " get_mempool: not connected to d e amon" < < endl ;
cerr < < " get_mempool: not connected to d ae mon" < < endl ;
return false ;
}
@ -93,8 +94,8 @@ rpccalls::get_mempool(vector<tx_info>& mempool_txs)
if ( ! r | | res . status ! = CORE_RPC_STATUS_OK )
{
cerr < < " Error connecting to Monero d e amon at "
< < d e amon_url < < endl ;
cerr < < " Error connecting to Monero d ae mon at "
< < d ae mon_url < < endl ;
return false ;
}
@ -127,9 +128,9 @@ rpccalls::commit_tx(tools::wallet2::pending_tx& ptx, string& error_msg)
std : : lock_guard < std : : mutex > guard ( m_daemon_rpc_mutex ) ;
if ( ! connect_to_monero_d e amon( ) )
if ( ! connect_to_monero_d ae mon( ) )
{
cerr < < " commit_tx: not connected to d e amon" < < endl ;
cerr < < " commit_tx: not connected to d ae mon" < < endl ;
return false ;
}
@ -166,9 +167,9 @@ rpccalls::get_network_info(COMMAND_RPC_GET_INFO::response& response)
{
std : : lock_guard < std : : mutex > guard ( m_daemon_rpc_mutex ) ;
if ( ! connect_to_monero_d e amon( ) )
if ( ! connect_to_monero_d ae mon( ) )
{
cerr < < " get_network_info: not connected to d e amon" < < endl ;
cerr < < " get_network_info: not connected to d ae mon" < < endl ;
return false ;
}
@ -192,15 +193,15 @@ rpccalls::get_network_info(COMMAND_RPC_GET_INFO::response& response)
if ( ! err . empty ( ) )
{
cerr < < " Error connecting to Monero d e amon due to "
cerr < < " Error connecting to Monero d ae mon due to "
< < err < < endl ;
return false ;
}
}
else
{
cerr < < " Error connecting to Monero d e amon at "
< < d e amon_url < < endl ;
cerr < < " Error connecting to Monero d ae mon at "
< < d ae mon_url < < endl ;
return false ;
}
@ -226,9 +227,9 @@ rpccalls::get_hardfork_info(COMMAND_RPC_HARD_FORK_INFO::response& response)
{
std : : lock_guard < std : : mutex > guard ( m_daemon_rpc_mutex ) ;
if ( ! connect_to_monero_d e amon( ) )
if ( ! connect_to_monero_d ae mon( ) )
{
cerr < < " get_hardfork_info: not connected to d e amon" < < endl ;
cerr < < " get_hardfork_info: not connected to d ae mon" < < endl ;
return false ;
}
@ -253,15 +254,15 @@ rpccalls::get_hardfork_info(COMMAND_RPC_HARD_FORK_INFO::response& response)
if ( ! err . empty ( ) )
{
cerr < < " Error connecting to Monero d e amon due to "
cerr < < " Error connecting to Monero d ae mon due to "
< < err < < endl ;
return false ;
}
}
else
{
cerr < < " Error connecting to Monero d e amon at "
< < d e amon_url < < endl ;
cerr < < " Error connecting to Monero d ae mon at "
< < d ae mon_url < < endl ;
return false ;
}
@ -294,9 +295,9 @@ rpccalls::get_dynamic_per_kb_fee_estimate(
{
std : : lock_guard < std : : mutex > guard ( m_daemon_rpc_mutex ) ;
if ( ! connect_to_monero_d e amon( ) )
if ( ! connect_to_monero_d ae mon( ) )
{
cerr < < " get_dynamic_per_kb_fee_estimate: not connected to d e amon" < < endl ;
cerr < < " get_dynamic_per_kb_fee_estimate: not connected to d ae mon" < < endl ;
return false ;
}
@ -321,15 +322,15 @@ rpccalls::get_dynamic_per_kb_fee_estimate(
if ( ! err . empty ( ) )
{
cerr < < " Error connecting to Monero d e amon due to "
cerr < < " Error connecting to Monero d ae mon due to "
< < err < < endl ;
return false ;
}
}
else
{
cerr < < " Error connecting to Monero d e amon at "
< < d e amon_url < < endl ;
cerr < < " Error connecting to Monero d ae mon at "
< < d ae mon_url < < endl ;
return false ;
}
@ -357,9 +358,9 @@ rpccalls::get_block(string const& blk_hash, block& blk, string& error_msg)
{
std : : lock_guard < std : : mutex > guard ( m_daemon_rpc_mutex ) ;
if ( ! connect_to_monero_d e amon( ) )
if ( ! connect_to_monero_d ae mon( ) )
{
cerr < < " get_block: not connected to d e amon" < < endl ;
cerr < < " get_block: not connected to d ae mon" < < endl ;
return false ;
}
@ -384,15 +385,15 @@ rpccalls::get_block(string const& blk_hash, block& blk, string& error_msg)
if ( ! err . empty ( ) )
{
cerr < < " Error connecting to Monero d e amon due to "
cerr < < " Error connecting to Monero d ae mon due to "
< < err < < endl ;
return false ;
}
}
else
{
cerr < < " get_block: error connecting to Monero d e amon at "
< < d e amon_url < < endl ;
cerr < < " get_block: error connecting to Monero d ae mon at "
< < d ae mon_url < < endl ;
return false ;
}