Monero
Loading...
Searching...
No Matches
tools::NodeRPCProxy Class Reference

#include <node_rpc_proxy.h>

Collaboration diagram for tools::NodeRPCProxy:

Public Member Functions

 NodeRPCProxy (epee::net_utils::http::abstract_http_client &http_client, rpc_payment_state_t &rpc_payment_state, boost::recursive_mutex &mutex)
void set_client_secret_key (const crypto::secret_key &skey)
void invalidate ()
void set_offline (bool offline)
boost::optional< std::string > get_rpc_version (uint32_t &rpc_version, std::vector< std::pair< uint8_t, uint64_t > > &daemon_hard_forks, uint64_t &height, uint64_t &target_height)
boost::optional< std::string > get_height (uint64_t &height)
void set_height (uint64_t h)
boost::optional< std::string > get_target_height (uint64_t &height)
boost::optional< std::string > get_block_weight_limit (uint64_t &block_weight_limit)
boost::optional< std::string > get_adjusted_time (uint64_t &adjusted_time)
boost::optional< std::string > get_earliest_height (uint8_t version, uint64_t &earliest_height)
boost::optional< std::string > get_dynamic_base_fee_estimate (uint64_t grace_blocks, uint64_t &fee)
boost::optional< std::string > get_dynamic_base_fee_estimate_2021_scaling (uint64_t grace_blocks, std::vector< uint64_t > &fees)
boost::optional< std::string > get_fee_quantization_mask (uint64_t &fee_quantization_mask)
boost::optional< std::string > get_rpc_payment_info (bool mining, bool &payment_required, uint64_t &credits, uint64_t &diff, uint64_t &credits_per_hash_found, cryptonote::blobdata &blob, uint64_t &height, uint64_t &seed_height, crypto::hash &seed_hash, crypto::hash &next_seed_hash, uint32_t &cookie)
boost::optional< std::string > get_transactions (const std::vector< crypto::hash > &txids, const std::function< void(const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::request &, const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::response &, bool)> &f)
boost::optional< std::string > get_block_header_by_height (uint64_t height, cryptonote::block_header_response &block_header)

Private Member Functions

template<typename T>
void handle_payment_changes (const T &res, std::true_type)
template<typename T>
void handle_payment_changes (const T &res, std::false_type)
boost::optional< std::string > get_info ()

Private Attributes

epee::net_utils::http::abstract_http_clientm_http_client
rpc_payment_state_tm_rpc_payment_state
boost::recursive_mutex & m_daemon_rpc_mutex
crypto::secret_key m_client_id_secret_key
bool m_offline
uint64_t m_height
uint64_t m_earliest_height [256]
uint64_t m_dynamic_base_fee_estimate
uint64_t m_dynamic_base_fee_estimate_cached_height
uint64_t m_dynamic_base_fee_estimate_grace_blocks
std::vector< uint64_tm_dynamic_base_fee_estimate_vector
uint64_t m_fee_quantization_mask
uint64_t m_adjusted_time
uint32_t m_rpc_version
uint64_t m_target_height
uint64_t m_block_weight_limit
time_t m_get_info_time
time_t m_rpc_payment_info_time
uint64_t m_rpc_payment_diff
uint64_t m_rpc_payment_credits_per_hash_found
cryptonote::blobdata m_rpc_payment_blob
uint64_t m_rpc_payment_height
uint64_t m_rpc_payment_seed_height
crypto::hash m_rpc_payment_seed_hash
crypto::hash m_rpc_payment_next_seed_hash
uint32_t m_rpc_payment_cookie
time_t m_height_time
time_t m_target_height_time
std::vector< std::pair< uint8_t, uint64_t > > m_daemon_hard_forks

Constructor & Destructor Documentation

◆ NodeRPCProxy()

tools::NodeRPCProxy::NodeRPCProxy ( epee::net_utils::http::abstract_http_client & http_client,
rpc_payment_state_t & rpc_payment_state,
boost::recursive_mutex & mutex )

Member Function Documentation

◆ get_adjusted_time()

boost::optional< std::string > tools::NodeRPCProxy::get_adjusted_time ( uint64_t & adjusted_time)

◆ get_block_header_by_height()

boost::optional< std::string > tools::NodeRPCProxy::get_block_header_by_height ( uint64_t height,
cryptonote::block_header_response & block_header )

◆ get_block_weight_limit()

boost::optional< std::string > tools::NodeRPCProxy::get_block_weight_limit ( uint64_t & block_weight_limit)

◆ get_dynamic_base_fee_estimate()

boost::optional< std::string > tools::NodeRPCProxy::get_dynamic_base_fee_estimate ( uint64_t grace_blocks,
uint64_t & fee )

◆ get_dynamic_base_fee_estimate_2021_scaling()

boost::optional< std::string > tools::NodeRPCProxy::get_dynamic_base_fee_estimate_2021_scaling ( uint64_t grace_blocks,
std::vector< uint64_t > & fees )

◆ get_earliest_height()

boost::optional< std::string > tools::NodeRPCProxy::get_earliest_height ( uint8_t version,
uint64_t & earliest_height )

◆ get_fee_quantization_mask()

boost::optional< std::string > tools::NodeRPCProxy::get_fee_quantization_mask ( uint64_t & fee_quantization_mask)

◆ get_height()

boost::optional< std::string > tools::NodeRPCProxy::get_height ( uint64_t & height)

◆ get_info()

boost::optional< std::string > tools::NodeRPCProxy::get_info ( )
private

◆ get_rpc_payment_info()

boost::optional< std::string > tools::NodeRPCProxy::get_rpc_payment_info ( bool mining,
bool & payment_required,
uint64_t & credits,
uint64_t & diff,
uint64_t & credits_per_hash_found,
cryptonote::blobdata & blob,
uint64_t & height,
uint64_t & seed_height,
crypto::hash & seed_hash,
crypto::hash & next_seed_hash,
uint32_t & cookie )

◆ get_rpc_version()

boost::optional< std::string > tools::NodeRPCProxy::get_rpc_version ( uint32_t & rpc_version,
std::vector< std::pair< uint8_t, uint64_t > > & daemon_hard_forks,
uint64_t & height,
uint64_t & target_height )

◆ get_target_height()

boost::optional< std::string > tools::NodeRPCProxy::get_target_height ( uint64_t & height)

◆ get_transactions()

boost::optional< std::string > tools::NodeRPCProxy::get_transactions ( const std::vector< crypto::hash > & txids,
const std::function< void(const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::request &, const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::response &, bool)> & f )

◆ handle_payment_changes() [1/2]

template<typename T>
void tools::NodeRPCProxy::handle_payment_changes ( const T & res,
std::false_type  )
inlineprivate

◆ handle_payment_changes() [2/2]

template<typename T>
void tools::NodeRPCProxy::handle_payment_changes ( const T & res,
std::true_type  )
inlineprivate

◆ invalidate()

void tools::NodeRPCProxy::invalidate ( )

◆ set_client_secret_key()

void tools::NodeRPCProxy::set_client_secret_key ( const crypto::secret_key & skey)
inline

◆ set_height()

void tools::NodeRPCProxy::set_height ( uint64_t h)

◆ set_offline()

void tools::NodeRPCProxy::set_offline ( bool offline)
inline

Member Data Documentation

◆ m_adjusted_time

uint64_t tools::NodeRPCProxy::m_adjusted_time
private

◆ m_block_weight_limit

uint64_t tools::NodeRPCProxy::m_block_weight_limit
private

◆ m_client_id_secret_key

crypto::secret_key tools::NodeRPCProxy::m_client_id_secret_key
private

◆ m_daemon_hard_forks

std::vector<std::pair<uint8_t, uint64_t> > tools::NodeRPCProxy::m_daemon_hard_forks
private

◆ m_daemon_rpc_mutex

boost::recursive_mutex& tools::NodeRPCProxy::m_daemon_rpc_mutex
private

◆ m_dynamic_base_fee_estimate

uint64_t tools::NodeRPCProxy::m_dynamic_base_fee_estimate
private

◆ m_dynamic_base_fee_estimate_cached_height

uint64_t tools::NodeRPCProxy::m_dynamic_base_fee_estimate_cached_height
private

◆ m_dynamic_base_fee_estimate_grace_blocks

uint64_t tools::NodeRPCProxy::m_dynamic_base_fee_estimate_grace_blocks
private

◆ m_dynamic_base_fee_estimate_vector

std::vector<uint64_t> tools::NodeRPCProxy::m_dynamic_base_fee_estimate_vector
private

◆ m_earliest_height

uint64_t tools::NodeRPCProxy::m_earliest_height[256]
private

◆ m_fee_quantization_mask

uint64_t tools::NodeRPCProxy::m_fee_quantization_mask
private

◆ m_get_info_time

time_t tools::NodeRPCProxy::m_get_info_time
private

◆ m_height

uint64_t tools::NodeRPCProxy::m_height
private

◆ m_height_time

time_t tools::NodeRPCProxy::m_height_time
private

◆ m_http_client

epee::net_utils::http::abstract_http_client& tools::NodeRPCProxy::m_http_client
private

◆ m_offline

bool tools::NodeRPCProxy::m_offline
private

◆ m_rpc_payment_blob

cryptonote::blobdata tools::NodeRPCProxy::m_rpc_payment_blob
private

◆ m_rpc_payment_cookie

uint32_t tools::NodeRPCProxy::m_rpc_payment_cookie
private

◆ m_rpc_payment_credits_per_hash_found

uint64_t tools::NodeRPCProxy::m_rpc_payment_credits_per_hash_found
private

◆ m_rpc_payment_diff

uint64_t tools::NodeRPCProxy::m_rpc_payment_diff
private

◆ m_rpc_payment_height

uint64_t tools::NodeRPCProxy::m_rpc_payment_height
private

◆ m_rpc_payment_info_time

time_t tools::NodeRPCProxy::m_rpc_payment_info_time
private

◆ m_rpc_payment_next_seed_hash

crypto::hash tools::NodeRPCProxy::m_rpc_payment_next_seed_hash
private

◆ m_rpc_payment_seed_hash

crypto::hash tools::NodeRPCProxy::m_rpc_payment_seed_hash
private

◆ m_rpc_payment_seed_height

uint64_t tools::NodeRPCProxy::m_rpc_payment_seed_height
private

◆ m_rpc_payment_state

rpc_payment_state_t& tools::NodeRPCProxy::m_rpc_payment_state
private

◆ m_rpc_version

uint32_t tools::NodeRPCProxy::m_rpc_version
private

◆ m_target_height

uint64_t tools::NodeRPCProxy::m_target_height
private

◆ m_target_height_time

time_t tools::NodeRPCProxy::m_target_height_time
private

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