Monero C++ Library
Loading...
Searching...
No Matches
monero::monero_daemon_rpc Class Reference

#include <monero_daemon_rpc.h>

Inheritance diagram for monero::monero_daemon_rpc:
monero::monero_daemon

Public Member Functions

 ~monero_daemon_rpc () override
 
 monero_daemon_rpc (const std::shared_ptr< monero_rpc_connection > &rpc)
 
 monero_daemon_rpc (const std::string &uri, const std::string &username="", const std::string &password="", const std::string &proxy_uri="", const std::string &zmq_uri="", const boost::optional< uint32_t > &timeout=boost::none)
 
std::shared_ptr< monero_rpc_connectionget_rpc_connection () const
 
bool is_connected ()
 
void set_poll_period_in_ms (uint64_t period_ms)
 
std::set< monero_daemon_listener * > get_listeners () override
 
void add_listener (monero_daemon_listener &listener) override
 
void remove_listener (monero_daemon_listener &listener) override
 
void remove_listeners () override
 
monero_version get_version () override
 
bool is_trusted () override
 
uint64_t get_height () override
 
std::string get_block_hash (uint64_t height) override
 
std::shared_ptr< monero_block_templateget_block_template (const std::string &wallet_address, const boost::optional< int > &reserve_size=boost::none) override
 
std::shared_ptr< monero_block_headerget_last_block_header () override
 
std::shared_ptr< monero_block_headerget_block_header_by_hash (const std::string &hash) override
 
std::shared_ptr< monero_block_headerget_block_header_by_height (uint64_t height) override
 
std::vector< std::shared_ptr< monero_block_header > > get_block_headers_by_range (uint64_t start_height, uint64_t end_height) override
 
std::shared_ptr< monero_blockget_block_by_hash (const std::string &hash) override
 
std::vector< std::shared_ptr< monero_block > > get_blocks_by_hash (const std::vector< std::string > &block_hashes, uint64_t start_height, bool prune) override
 
std::shared_ptr< monero_blockget_block_by_height (uint64_t height) override
 
std::vector< std::shared_ptr< monero_block > > get_blocks_by_height (const std::vector< uint64_t > &heights) override
 
std::vector< std::shared_ptr< monero_block > > get_blocks_by_range (boost::optional< uint64_t > start_height, boost::optional< uint64_t > end_height) override
 
std::vector< std::shared_ptr< monero_block > > get_blocks_by_range_chunked (boost::optional< uint64_t > start_height, boost::optional< uint64_t > end_height, boost::optional< uint64_t > max_chunk_size) override
 
std::vector< std::string > get_block_hashes (const std::vector< std::string > &block_hashes, uint64_t start_height) override
 
std::vector< std::shared_ptr< monero_tx > > get_txs (const std::vector< std::string > &tx_hashes, bool prune=false) override
 
std::vector< std::string > get_tx_hexes (const std::vector< std::string > &tx_hashes, bool prune=false) override
 
std::shared_ptr< monero_miner_tx_sumget_miner_tx_sum (uint64_t height, uint64_t num_blocks) override
 
std::shared_ptr< monero_fee_estimateget_fee_estimate (uint64_t grace_blocks=0) override
 
std::shared_ptr< monero_submit_tx_resultsubmit_tx_hex (const std::string &tx_hex, bool do_not_relay=false) override
 
void relay_txs_by_hash (const std::vector< std::string > &tx_hashes) override
 
std::shared_ptr< monero_tx_pool_statsget_tx_pool_stats () override
 
std::vector< std::shared_ptr< monero_tx > > get_tx_pool () override
 
std::vector< std::string > get_tx_pool_hashes () override
 
void flush_tx_pool (const std::vector< std::string > &hashes) override
 
void flush_tx_pool () override
 
void flush_tx_pool (const std::string &hash) override
 
std::vector< monero_key_image_spent_statusget_key_image_spent_statuses (const std::vector< std::string > &key_images) override
 
std::vector< std::shared_ptr< monero_output > > get_outputs (const std::vector< monero_output > &outputs) override
 
std::vector< std::shared_ptr< monero_output_histogram_entry > > get_output_histogram (const std::vector< uint64_t > &amounts, const boost::optional< int > &min_count, const boost::optional< int > &max_count, const boost::optional< bool > &is_unlocked, const boost::optional< int > &recent_cutoff) override
 
std::vector< std::shared_ptr< monero_output_distribution_entry > > get_output_distribution (const std::vector< uint64_t > &amounts, const boost::optional< bool > &is_cumulative=boost::none, const boost::optional< uint64_t > &start_height=boost::none, const boost::optional< uint64_t > &end_height=boost::none) override
 
std::shared_ptr< monero_daemon_infoget_info () override
 
std::shared_ptr< monero_daemon_sync_infoget_sync_info () override
 
std::shared_ptr< monero_hard_fork_infoget_hard_fork_info () override
 
std::vector< std::shared_ptr< monero_alt_chain > > get_alt_chains () override
 
std::vector< std::string > get_alt_block_hashes () override
 
int get_download_limit () override
 
int set_download_limit (int limit) override
 
int reset_download_limit () override
 
int get_upload_limit () override
 
int set_upload_limit (int limit) override
 
int reset_upload_limit () override
 
std::vector< std::shared_ptr< monero_peer > > get_peers () override
 
std::vector< std::shared_ptr< monero_peer > > get_known_peers () override
 
void set_outgoing_peer_limit (int limit) override
 
void set_incoming_peer_limit (int limit) override
 
std::vector< std::shared_ptr< monero_ban > > get_peer_bans () override
 
void set_peer_bans (const std::vector< std::shared_ptr< monero_ban > > &bans) override
 
void start_mining (const std::string &address, boost::optional< uint64_t > num_threads, boost::optional< bool > background_mining, boost::optional< bool > ignore_battery) override
 
void stop_mining () override
 
std::shared_ptr< monero_mining_statusget_mining_status () override
 
std::shared_ptr< monero_generate_blocks_resultgenerate_blocks (const std::string &wallet_address, uint64_t num_blocks, const boost::optional< std::string > &prev_block_hash=boost::none, const boost::optional< uint32_t > &starting_nonce=boost::none) override
 
void submit_blocks (const std::vector< std::string > &block_blobs) override
 
std::shared_ptr< monero_prune_resultprune_blockchain (bool check) override
 
std::shared_ptr< monero_daemon_update_check_resultcheck_for_update () override
 
std::shared_ptr< monero_daemon_update_download_resultdownload_update (const std::string &path="") override
 
void stop () override
 
std::shared_ptr< monero_block_headerwait_for_next_block_header () override
 
- Public Member Functions inherited from monero::monero_daemon
virtual ~monero_daemon ()
 
virtual std::shared_ptr< monero_txget_tx (const std::string &tx_hash, bool prune=false)
 
virtual boost::optional< std::string > get_tx_hex (const std::string &tx_hash, bool prune=false)
 
virtual void relay_tx_by_hash (const std::string &tx_hash)
 
virtual std::vector< monero_tx_backlog_entryget_tx_pool_backlog ()
 
virtual monero_key_image_spent_status get_key_image_spent_status (const std::string &key_image)
 
virtual void set_peer_ban (const std::shared_ptr< monero_ban > &ban)
 
virtual void submit_block (const std::string &block_blob)
 

Friends

class monero_daemon_poller
 

Detailed Description

Implements a Monero daemon using monerod-rpc.

Constructor & Destructor Documentation

◆ ~monero_daemon_rpc()

monero::monero_daemon_rpc::~monero_daemon_rpc ( )
override

Destruct the daemon.

Member Function Documentation

◆ add_listener()

void monero::monero_daemon_rpc::add_listener ( monero_daemon_listener & listener)
overridevirtual

Register a listener receive daemon notifications.

Parameters
listeneris the listener to receive daemon notifications

Reimplemented from monero::monero_daemon.

◆ check_for_update()

std::shared_ptr< monero_daemon_update_check_result > monero::monero_daemon_rpc::check_for_update ( )
overridevirtual

Check for update.

Returns
the result of the update check

Reimplemented from monero::monero_daemon.

◆ download_update()

std::shared_ptr< monero_daemon_update_download_result > monero::monero_daemon_rpc::download_update ( const std::string & path = "")
overridevirtual

Download an update.

Parameters
pathis the path to download the update (optional)
Returns
the result of the update download

Reimplemented from monero::monero_daemon.

◆ flush_tx_pool() [1/3]

void monero::monero_daemon_rpc::flush_tx_pool ( )
overridevirtual

Flushes all transactions from the tx pool.

Reimplemented from monero::monero_daemon.

◆ flush_tx_pool() [2/3]

void monero::monero_daemon_rpc::flush_tx_pool ( const std::string & hash)
overridevirtual

Flush a single transaction from the tx pool.

Parameters
hashis the hash of transaction to flush

Reimplemented from monero::monero_daemon.

◆ flush_tx_pool() [3/3]

void monero::monero_daemon_rpc::flush_tx_pool ( const std::vector< std::string > & hashes)
overridevirtual

Flush transactions from the tx pool.

Parameters
hashesare hashes of transactions to flush

Reimplemented from monero::monero_daemon.

◆ generate_blocks()

std::shared_ptr< monero_generate_blocks_result > monero::monero_daemon_rpc::generate_blocks ( const std::string & wallet_address,
uint64_t num_blocks,
const boost::optional< std::string > & prev_block_hash = boost::none,
const boost::optional< uint32_t > & starting_nonce = boost::none )
overridevirtual

Generate blocks to a wallet address (regtest only).

Parameters
wallet_addressis the address of the wallet to receive miner transactions if block is successfully mined
num_blocksis the number of blocks to generate
prev_block_hashis the hash of the previous block to build on top of (optional, builds on the current tip if not given)
starting_nonceis the starting nonce to use (optional)
Returns
the result of generating blocks; height is the height of the last block generated

Reimplemented from monero::monero_daemon.

◆ get_alt_block_hashes()

std::vector< std::string > monero::monero_daemon_rpc::get_alt_block_hashes ( )
overridevirtual

Get known block hashes which are not on the main chain.

Returns
known block hashes which are not on the main chain

Reimplemented from monero::monero_daemon.

◆ get_alt_chains()

std::vector< std::shared_ptr< monero_alt_chain > > monero::monero_daemon_rpc::get_alt_chains ( )
overridevirtual

Get alternative chains seen by the node.

Returns
alternative chains seen by the node

Reimplemented from monero::monero_daemon.

◆ get_block_by_hash()

std::shared_ptr< monero_block > monero::monero_daemon_rpc::get_block_by_hash ( const std::string & block_hash)
overridevirtual

Get a block by hash.

Parameters
block_hashis the hash of the block to get
Returns
the block with the given hash

Reimplemented from monero::monero_daemon.

◆ get_block_by_height()

std::shared_ptr< monero_block > monero::monero_daemon_rpc::get_block_by_height ( uint64_t height)
overridevirtual

Get a block by height.

Parameters
heightis the height of the block to get
Returns
the block at the given height

Reimplemented from monero::monero_daemon.

◆ get_block_hash()

std::string monero::monero_daemon_rpc::get_block_hash ( uint64_t height)
overridevirtual

Get a block's hash by its height.

Parameters
heightis the height of the block hash to get
Returns
tthe block's hash at the given height

Reimplemented from monero::monero_daemon.

◆ get_block_hashes()

std::vector< std::string > monero::monero_daemon_rpc::get_block_hashes ( const std::vector< std::string > & block_hashes,
uint64_t start_height )
overridevirtual

Get block hashes as a binary request to the daemon.

Parameters
block_hashesspecify block hashes to fetch; first 10 blocks hash goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block
start_heightis the starting height of block hashes to return
Returns
the requested block hashes

Reimplemented from monero::monero_daemon.

◆ get_block_header_by_hash()

std::shared_ptr< monero_block_header > monero::monero_daemon_rpc::get_block_header_by_hash ( const std::string & block_hash)
overridevirtual

Get a block header by its hash.

Parameters
block_hashis the hash of the block to get the header of
Returns
the block's header

Reimplemented from monero::monero_daemon.

◆ get_block_header_by_height()

std::shared_ptr< monero_block_header > monero::monero_daemon_rpc::get_block_header_by_height ( uint64_t height)
overridevirtual

Get a block header by its height.

Parameters
heightis the height of the block to get the header of
Returns
the block's header

Reimplemented from monero::monero_daemon.

◆ get_block_headers_by_range()

std::vector< std::shared_ptr< monero_block_header > > monero::monero_daemon_rpc::get_block_headers_by_range ( uint64_t start_height,
uint64_t end_height )
overridevirtual

Get block headers for the given range.

Parameters
start_heightis the start height lower bound inclusive (optional)
end_heightis the end height upper bound inclusive (optional)
Returns
block headers in the given range

Reimplemented from monero::monero_daemon.

◆ get_block_template()

std::shared_ptr< monero_block_template > monero::monero_daemon_rpc::get_block_template ( const std::string & wallet_address,
const boost::optional< int > & reserve_size = boost::none )
overridevirtual

Get a block template for mining a new block.

Parameters
wallet_addressis the address of the wallet to receive miner transactions if block is successfully mined
reserve_sizeis the reserve size (optional)
Returns
a block template for mining a new block

Reimplemented from monero::monero_daemon.

◆ get_blocks_by_hash()

std::vector< std::shared_ptr< monero_block > > monero::monero_daemon_rpc::get_blocks_by_hash ( const std::vector< std::string > & block_hashes,
uint64_t start_height,
bool prune )
overridevirtual

Get blocks by hash.

Parameters
block_hashesare array of hashes; first 10 blocks hash goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block
start_heightis the start height to get blocks by hash
prunespecifies if returned blocks should be pruned (defaults to false) // TODO: test default
Returns
the retrieved blocks

Reimplemented from monero::monero_daemon.

◆ get_blocks_by_height()

std::vector< std::shared_ptr< monero_block > > monero::monero_daemon_rpc::get_blocks_by_height ( const std::vector< uint64_t > & heights)
overridevirtual

Get blocks at the given heights.

Parameters
heightsare the heights of the blocks to get
Returns
blocks at the given heights

Reimplemented from monero::monero_daemon.

◆ get_blocks_by_range()

std::vector< std::shared_ptr< monero_block > > monero::monero_daemon_rpc::get_blocks_by_range ( boost::optional< uint64_t > start_height,
boost::optional< uint64_t > end_height )
overridevirtual

Get blocks in the given height range.

Parameters
start_heightis the start height lower bound inclusive (optional)
end_heightis the end height upper bound inclusive (optional)
Returns
blocks in the given height range

Reimplemented from monero::monero_daemon.

◆ get_blocks_by_range_chunked()

std::vector< std::shared_ptr< monero_block > > monero::monero_daemon_rpc::get_blocks_by_range_chunked ( boost::optional< uint64_t > start_height,
boost::optional< uint64_t > end_height,
boost::optional< uint64_t > max_chunk_size )
overridevirtual

Get blocks in the given height range as chunked requests so that each request is not too big.

Parameters
start_heightis the start height lower bound inclusive (optional)
end_heightis the end height upper bound inclusive (optional)
Returns
blocks in the given height range

Reimplemented from monero::monero_daemon.

◆ get_download_limit()

int monero::monero_daemon_rpc::get_download_limit ( )
overridevirtual

Get the download bandwidth limit.

Returns
is the download bandwidth limit

Reimplemented from monero::monero_daemon.

◆ get_fee_estimate()

std::shared_ptr< monero_fee_estimate > monero::monero_daemon_rpc::get_fee_estimate ( uint64_t grace_blocks = 0)
overridevirtual

Get mining fee estimates per kB.

Parameters
grace_blocksTODO
Returns
mining fee estimates per kB

Reimplemented from monero::monero_daemon.

◆ get_hard_fork_info()

std::shared_ptr< monero_hard_fork_info > monero::monero_daemon_rpc::get_hard_fork_info ( )
overridevirtual

Look up information regarding hard fork voting and readiness.

Returns
hard fork information

Reimplemented from monero::monero_daemon.

◆ get_height()

uint64_t monero::monero_daemon_rpc::get_height ( )
overridevirtual

Get the number of blocks in the longest chain known to the node.

Returns
the number of blocks

Reimplemented from monero::monero_daemon.

◆ get_info()

std::shared_ptr< monero_daemon_info > monero::monero_daemon_rpc::get_info ( )
overridevirtual

Get general information about the state of the node and the network.

Returns
general information about the node and network

Reimplemented from monero::monero_daemon.

◆ get_key_image_spent_statuses()

std::vector< monero_key_image_spent_status > monero::monero_daemon_rpc::get_key_image_spent_statuses ( const std::vector< std::string > & key_images)
overridevirtual

Get the spent status of each given key image.

Parameters
key_imageare hex key images to get the statuses of
Returns
the spent status for each key image

Reimplemented from monero::monero_daemon.

◆ get_known_peers()

std::vector< std::shared_ptr< monero_peer > > monero::monero_daemon_rpc::get_known_peers ( )
overridevirtual

Get all known peers including their last known online status.

Returns
the daemon's known peers

Reimplemented from monero::monero_daemon.

◆ get_last_block_header()

std::shared_ptr< monero_block_header > monero::monero_daemon_rpc::get_last_block_header ( )
overridevirtual

Get the last block's header.

Returns
the last block's header

Reimplemented from monero::monero_daemon.

◆ get_listeners()

std::set< monero_daemon_listener * > monero::monero_daemon_rpc::get_listeners ( )
overridevirtual

Supported daemon methods.

Reimplemented from monero::monero_daemon.

◆ get_miner_tx_sum()

std::shared_ptr< monero_miner_tx_sum > monero::monero_daemon_rpc::get_miner_tx_sum ( uint64_t height,
uint64_t num_blocks )
overridevirtual

Gets the total emissions and fees from the genesis block to the current height.

Parameters
heightis the height to start computing the miner sum
num_blocksare the number of blocks to include in the sum
Returns
the sum emission and fees since the geneis block

Reimplemented from monero::monero_daemon.

◆ get_mining_status()

std::shared_ptr< monero_mining_status > monero::monero_daemon_rpc::get_mining_status ( )
overridevirtual

Get the daemon's mining status.

Returns
the daemon's mining status

Reimplemented from monero::monero_daemon.

◆ get_output_distribution()

std::vector< std::shared_ptr< monero_output_distribution_entry > > monero::monero_daemon_rpc::get_output_distribution ( const std::vector< uint64_t > & amounts,
const boost::optional< bool > & is_cumulative = boost::none,
const boost::optional< uint64_t > & start_height = boost::none,
const boost::optional< uint64_t > & end_height = boost::none )
overridevirtual

Creates an output distribution.

Parameters
amountsare amounts of outputs to make the distribution with
is_cumulativespecifies if the results should be cumulative (defaults to TODO)
start_heightis the start height lower bound inclusive (optional)
end_heightis the end height upper bound inclusive (optional)
Returns
output distribution entries meeting the parameters

Reimplemented from monero::monero_daemon.

◆ get_output_histogram()

std::vector< std::shared_ptr< monero_output_histogram_entry > > monero::monero_daemon_rpc::get_output_histogram ( const std::vector< uint64_t > & amounts,
const boost::optional< int > & min_count,
const boost::optional< int > & max_count,
const boost::optional< bool > & is_unlocked,
const boost::optional< int > & recent_cutoff )
overridevirtual

Get a histogram of output amounts. For all amounts (possibly filtered by parameters), gives the number of outputs on the chain for that amount. RingCT outputs counts as 0 amount.

Parameters
amountsare amounts of outputs to make the histogram with
min_countTODO
max_countTODO
is_unlockedmakes a histogram with outputs with the specified lock state
recent_cutoffTODO
Returns
output histogram entries meeting the parameters

Reimplemented from monero::monero_daemon.

◆ get_outputs()

std::vector< std::shared_ptr< monero_output > > monero::monero_daemon_rpc::get_outputs ( const std::vector< monero_output > & outputs)
overridevirtual

Get outputs identified by a list of output amounts and indices as a binary request.

Parameters
outputsidentify each output by amount and index
Returns
the identified outputs

Reimplemented from monero::monero_daemon.

◆ get_peer_bans()

std::vector< std::shared_ptr< monero_ban > > monero::monero_daemon_rpc::get_peer_bans ( )
overridevirtual

Get peer bans.

Returns
entries about banned peers

Reimplemented from monero::monero_daemon.

◆ get_peers()

std::vector< std::shared_ptr< monero_peer > > monero::monero_daemon_rpc::get_peers ( )
overridevirtual

Get peers with active incoming or outgoing connections to the node.

Returns
the daemon's peers

Reimplemented from monero::monero_daemon.

◆ get_rpc_connection()

std::shared_ptr< monero_rpc_connection > monero::monero_daemon_rpc::get_rpc_connection ( ) const

Get the daemon's RPC connection.

Returns
the daemon's rpc connection

◆ get_sync_info()

std::shared_ptr< monero_daemon_sync_info > monero::monero_daemon_rpc::get_sync_info ( )
overridevirtual

Get synchronization information.

Returns
contains sync information

Reimplemented from monero::monero_daemon.

◆ get_tx_hexes()

std::vector< std::string > monero::monero_daemon_rpc::get_tx_hexes ( const std::vector< std::string > & tx_hashes,
bool prune = false )
overridevirtual

Get transaction hexes by hashes.

Parameters
tx_hashesare hashes of transactions to get hexes from
prunespecifies if the returned tx hexes should be pruned (defaults to false)
Returns
are the tx hexes

Reimplemented from monero::monero_daemon.

◆ get_tx_pool()

std::vector< std::shared_ptr< monero_tx > > monero::monero_daemon_rpc::get_tx_pool ( )
overridevirtual

Get valid transactions seen by the node but not yet mined into a block, as well as spent key image information for the tx pool.

Returns
transactions in the transaction pool

Reimplemented from monero::monero_daemon.

◆ get_tx_pool_hashes()

std::vector< std::string > monero::monero_daemon_rpc::get_tx_pool_hashes ( )
overridevirtual

Get hashes of transactions in the transaction pool.

Returns
hashes of transactions in the transaction pool

Reimplemented from monero::monero_daemon.

◆ get_tx_pool_stats()

std::shared_ptr< monero_tx_pool_stats > monero::monero_daemon_rpc::get_tx_pool_stats ( )
overridevirtual

Get transaction pool statistics.

Returns
statistics about the transaction pool

Reimplemented from monero::monero_daemon.

◆ get_txs()

std::vector< std::shared_ptr< monero_tx > > monero::monero_daemon_rpc::get_txs ( const std::vector< std::string > & tx_hashes,
bool prune = false )
overridevirtual

Get transactions by hashes.

Parameters
tx_hashesare hashes of transactions to get
prunespecifies if the returned txs should be pruned (defaults to false)
Returns
found transactions with the given hashes

Reimplemented from monero::monero_daemon.

◆ get_upload_limit()

int monero::monero_daemon_rpc::get_upload_limit ( )
overridevirtual

Get the upload bandwidth limit.

Returns
is the upload bandwidth limit

Reimplemented from monero::monero_daemon.

◆ get_version()

monero_version monero::monero_daemon_rpc::get_version ( )
overridevirtual

Get the daemon's version.

Returns
the daemon's version

Reimplemented from monero::monero_daemon.

◆ is_connected()

bool monero::monero_daemon_rpc::is_connected ( )

Indicates if the client is connected to the daemon via RPC.

Returns
true if the client is connected to the daemon, false otherwise

◆ is_trusted()

bool monero::monero_daemon_rpc::is_trusted ( )
overridevirtual

Indicates if the daemon is trusted or untrusted.

Returns
true if the daemon is trusted, false otherwise

Reimplemented from monero::monero_daemon.

◆ prune_blockchain()

std::shared_ptr< monero_prune_result > monero::monero_daemon_rpc::prune_blockchain ( bool check)
overridevirtual

Prune the blockchain.

Parameters
checkspecifies to check the pruning (default false)
Returns
the prune result

Reimplemented from monero::monero_daemon.

◆ relay_txs_by_hash()

void monero::monero_daemon_rpc::relay_txs_by_hash ( const std::vector< std::string > & tx_hashes)
overridevirtual

Relays transactions by hash.

Parameters
tx_hashesidentify the transactions to relay

Reimplemented from monero::monero_daemon.

◆ remove_listener()

void monero::monero_daemon_rpc::remove_listener ( monero_daemon_listener & listener)
overridevirtual

Unregister a listener to receive daemon notifications.

Parameters
listeneris the listener to unregister

Reimplemented from monero::monero_daemon.

◆ remove_listeners()

void monero::monero_daemon_rpc::remove_listeners ( )
overridevirtual

Remove all listeners registered with the daemon.

Reimplemented from monero::monero_daemon.

◆ reset_download_limit()

int monero::monero_daemon_rpc::reset_download_limit ( )
overridevirtual

Reset the download bandwidth limit.

Returns
the download bandwidth limit after resetting

Reimplemented from monero::monero_daemon.

◆ reset_upload_limit()

int monero::monero_daemon_rpc::reset_upload_limit ( )
overridevirtual

Reset the upload bandwidth limit.

Returns
the upload bandwidth limit after resetting

Reimplemented from monero::monero_daemon.

◆ set_download_limit()

int monero::monero_daemon_rpc::set_download_limit ( int limit)
overridevirtual

Set the download bandwidth limit.

Parameters
limitis the download limit to set (-1 to reset to default)
Returns
int is the new download limit after setting

Reimplemented from monero::monero_daemon.

◆ set_incoming_peer_limit()

void monero::monero_daemon_rpc::set_incoming_peer_limit ( int limit)
overridevirtual

Limit number of incoming peers.

Parameters
limitis the maximum number of incoming peers

Reimplemented from monero::monero_daemon.

◆ set_outgoing_peer_limit()

void monero::monero_daemon_rpc::set_outgoing_peer_limit ( int limit)
overridevirtual

Limit number of outgoing peers.

Parameters
limitis the maximum number of outgoing peers

Reimplemented from monero::monero_daemon.

◆ set_peer_bans()

void monero::monero_daemon_rpc::set_peer_bans ( const std::vector< std::shared_ptr< monero_ban > > & bans)
overridevirtual

Ban peers nodes.

Parameters
bansare bans to apply against peer nodes

Reimplemented from monero::monero_daemon.

◆ set_poll_period_in_ms()

void monero::monero_daemon_rpc::set_poll_period_in_ms ( uint64_t period_ms)

Set the daemon poll period.

Parameters
period_mspoll period in milliseconds.

◆ set_upload_limit()

int monero::monero_daemon_rpc::set_upload_limit ( int limit)
overridevirtual

Set the upload bandwidth limit.

Parameters
limitis the upload limit to set (-1 to reset to default)
Returns
int is the new upload limit after setting

Reimplemented from monero::monero_daemon.

◆ start_mining()

void monero::monero_daemon_rpc::start_mining ( const std::string & address,
boost::optional< uint64_t > num_threads,
boost::optional< bool > is_background,
boost::optional< bool > ignore_battery )
overridevirtual

Start mining.

Parameters
addressis the address given miner rewards if the daemon mines a block
num_threadsis the number of mining threads to run
is_backgroundspecifies if the miner should run in the background or not
ignore_batteryspecifies if the battery state (e.g. on laptop) should be ignored or not

Reimplemented from monero::monero_daemon.

◆ stop()

void monero::monero_daemon_rpc::stop ( )
overridevirtual

Safely disconnect and shut down the daemon.

Reimplemented from monero::monero_daemon.

◆ stop_mining()

void monero::monero_daemon_rpc::stop_mining ( )
overridevirtual

Stop mining.

Reimplemented from monero::monero_daemon.

◆ submit_blocks()

void monero::monero_daemon_rpc::submit_blocks ( const std::vector< std::string > & block_blobs)
overridevirtual

Submit mined blocks to the network.

Parameters
block_blobsare the mined blocks to submit

Reimplemented from monero::monero_daemon.

◆ submit_tx_hex()

std::shared_ptr< monero_submit_tx_result > monero::monero_daemon_rpc::submit_tx_hex ( const std::string & tx_hex,
bool do_not_relay = false )
overridevirtual

Submits a transaction to the daemon's pool.

Parameters
tx_hexis the raw transaction hex to submit
do_not_relayspecifies if the tx should be relayed (optional)
Returns
the submission results

Reimplemented from monero::monero_daemon.

◆ wait_for_next_block_header()

std::shared_ptr< monero_block_header > monero::monero_daemon_rpc::wait_for_next_block_header ( )
overridevirtual

Get the header of the next block added to the chain.

Returns
the header of the next block added to the chain

Reimplemented from monero::monero_daemon.


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