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

#include <monero_daemon.h>

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

Public Member Functions

virtual ~monero_daemon ()
 
virtual void add_listener (monero_daemon_listener &listener)
 
virtual void remove_listener (monero_daemon_listener &listener)
 
virtual std::set< monero_daemon_listener * > get_listeners ()
 
virtual void remove_listeners ()
 
virtual monero_version get_version ()
 
virtual bool is_trusted ()
 
virtual uint64_t get_height ()
 
virtual std::string get_block_hash (uint64_t height)
 
virtual std::shared_ptr< monero_block_templateget_block_template (const std::string &wallet_address, const boost::optional< int > &reserve_size=boost::none)
 
virtual std::shared_ptr< monero_block_headerget_last_block_header ()
 
virtual std::shared_ptr< monero_block_headerget_block_header_by_hash (const std::string &block_hash)
 
virtual std::shared_ptr< monero_block_headerget_block_header_by_height (uint64_t height)
 
virtual std::vector< std::shared_ptr< monero_block_header > > get_block_headers_by_range (uint64_t start_height, uint64_t end_height)
 
virtual std::shared_ptr< monero_blockget_block_by_hash (const std::string &block_hash)
 
virtual std::vector< std::shared_ptr< monero_block > > get_blocks_by_hash (const std::vector< std::string > &block_hashes, uint64_t start_height, bool prune)
 
virtual std::shared_ptr< monero_blockget_block_by_height (uint64_t height)
 
virtual std::vector< std::shared_ptr< monero_block > > get_blocks_by_height (const std::vector< uint64_t > &heights)
 
virtual std::vector< std::shared_ptr< monero_block > > get_blocks_by_range (boost::optional< uint64_t > start_height, boost::optional< uint64_t > end_height)
 
virtual 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)
 
virtual std::vector< std::string > get_block_hashes (const std::vector< std::string > &block_hashes, uint64_t start_height)
 
virtual std::shared_ptr< monero_txget_tx (const std::string &tx_hash, bool prune=false)
 
virtual std::vector< std::shared_ptr< monero_tx > > get_txs (const std::vector< std::string > &tx_hashes, bool prune=false)
 
virtual boost::optional< std::string > get_tx_hex (const std::string &tx_hash, bool prune=false)
 
virtual std::vector< std::string > get_tx_hexes (const std::vector< std::string > &tx_hashes, bool prune=false)
 
virtual std::shared_ptr< monero_miner_tx_sumget_miner_tx_sum (uint64_t height, uint64_t num_blocks)
 
virtual std::shared_ptr< monero_fee_estimateget_fee_estimate (uint64_t grace_blocks=0)
 
virtual std::shared_ptr< monero_submit_tx_resultsubmit_tx_hex (const std::string &tx_hex, bool do_not_relay=false)
 
virtual void relay_tx_by_hash (const std::string &tx_hash)
 
virtual void relay_txs_by_hash (const std::vector< std::string > &tx_hashes)
 
virtual std::vector< std::shared_ptr< monero_tx > > get_tx_pool ()
 
virtual std::vector< std::string > get_tx_pool_hashes ()
 
virtual std::vector< monero_tx_backlog_entryget_tx_pool_backlog ()
 
virtual std::shared_ptr< monero_tx_pool_statsget_tx_pool_stats ()
 
virtual void flush_tx_pool ()
 
virtual void flush_tx_pool (const std::vector< std::string > &hashes)
 
virtual void flush_tx_pool (const std::string &hash)
 
virtual monero_key_image_spent_status get_key_image_spent_status (const std::string &key_image)
 
virtual std::vector< monero_key_image_spent_statusget_key_image_spent_statuses (const std::vector< std::string > &key_images)
 
virtual std::vector< std::shared_ptr< monero_output > > get_outputs (const std::vector< monero_output > &outputs)
 
virtual 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)
 
virtual 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)
 
virtual std::shared_ptr< monero_daemon_infoget_info ()
 
virtual std::shared_ptr< monero_daemon_sync_infoget_sync_info ()
 
virtual std::shared_ptr< monero_hard_fork_infoget_hard_fork_info ()
 
virtual std::vector< std::shared_ptr< monero_alt_chain > > get_alt_chains ()
 
virtual std::vector< std::string > get_alt_block_hashes ()
 
virtual int get_download_limit ()
 
virtual int set_download_limit (int limit)
 
virtual int reset_download_limit ()
 
virtual int get_upload_limit ()
 
virtual int set_upload_limit (int limit)
 
virtual int reset_upload_limit ()
 
virtual std::vector< std::shared_ptr< monero_peer > > get_peers ()
 
virtual std::vector< std::shared_ptr< monero_peer > > get_known_peers ()
 
virtual void set_outgoing_peer_limit (int limit)
 
virtual void set_incoming_peer_limit (int limit)
 
virtual std::vector< std::shared_ptr< monero_ban > > get_peer_bans ()
 
virtual void set_peer_bans (const std::vector< std::shared_ptr< monero_ban > > &bans)
 
virtual void set_peer_ban (const std::shared_ptr< monero_ban > &ban)
 
virtual void start_mining (const std::string &address, boost::optional< uint64_t > num_threads, boost::optional< bool > is_background, boost::optional< bool > ignore_battery)
 
virtual void stop_mining ()
 
virtual std::shared_ptr< monero_mining_statusget_mining_status ()
 
virtual 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)
 
virtual void submit_block (const std::string &block_blob)
 
virtual void submit_blocks (const std::vector< std::string > &block_blobs)
 
virtual std::shared_ptr< monero_prune_resultprune_blockchain (bool check)
 
virtual std::shared_ptr< monero_daemon_update_check_resultcheck_for_update ()
 
virtual std::shared_ptr< monero_daemon_update_download_resultdownload_update (const std::string &path="")
 
virtual void stop ()
 
virtual std::shared_ptr< monero_block_headerwait_for_next_block_header ()
 

Detailed Description

Monero daemon interface.

Constructor & Destructor Documentation

◆ ~monero_daemon()

virtual monero::monero_daemon::~monero_daemon ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ add_listener()

virtual void monero::monero_daemon::add_listener ( monero_daemon_listener & listener)
inlinevirtual

Register a listener receive daemon notifications.

Parameters
listeneris the listener to receive daemon notifications

Reimplemented in monero::monero_daemon_rpc.

◆ check_for_update()

virtual std::shared_ptr< monero_daemon_update_check_result > monero::monero_daemon::check_for_update ( )
inlinevirtual

Check for update.

Returns
the result of the update check

Reimplemented in monero::monero_daemon_rpc.

◆ download_update()

virtual std::shared_ptr< monero_daemon_update_download_result > monero::monero_daemon::download_update ( const std::string & path = "")
inlinevirtual

Download an update.

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

Reimplemented in monero::monero_daemon_rpc.

◆ flush_tx_pool() [1/3]

virtual void monero::monero_daemon::flush_tx_pool ( )
inlinevirtual

Flushes all transactions from the tx pool.

Reimplemented in monero::monero_daemon_rpc.

◆ flush_tx_pool() [2/3]

virtual void monero::monero_daemon::flush_tx_pool ( const std::string & hash)
inlinevirtual

Flush a single transaction from the tx pool.

Parameters
hashis the hash of transaction to flush

Reimplemented in monero::monero_daemon_rpc.

◆ flush_tx_pool() [3/3]

virtual void monero::monero_daemon::flush_tx_pool ( const std::vector< std::string > & hashes)
inlinevirtual

Flush transactions from the tx pool.

Parameters
hashesare hashes of transactions to flush

Reimplemented in monero::monero_daemon_rpc.

◆ generate_blocks()

virtual std::shared_ptr< monero_generate_blocks_result > monero::monero_daemon::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 )
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_alt_block_hashes()

virtual std::vector< std::string > monero::monero_daemon::get_alt_block_hashes ( )
inlinevirtual

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

Returns
known block hashes which are not on the main chain

Reimplemented in monero::monero_daemon_rpc.

◆ get_alt_chains()

virtual std::vector< std::shared_ptr< monero_alt_chain > > monero::monero_daemon::get_alt_chains ( )
inlinevirtual

Get alternative chains seen by the node.

Returns
alternative chains seen by the node

Reimplemented in monero::monero_daemon_rpc.

◆ get_block_by_hash()

virtual std::shared_ptr< monero_block > monero::monero_daemon::get_block_by_hash ( const std::string & block_hash)
inlinevirtual

Get a block by hash.

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

Reimplemented in monero::monero_daemon_rpc.

◆ get_block_by_height()

virtual std::shared_ptr< monero_block > monero::monero_daemon::get_block_by_height ( uint64_t height)
inlinevirtual

Get a block by height.

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

Reimplemented in monero::monero_daemon_rpc.

◆ get_block_hash()

virtual std::string monero::monero_daemon::get_block_hash ( uint64_t height)
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_block_hashes()

virtual std::vector< std::string > monero::monero_daemon::get_block_hashes ( const std::vector< std::string > & block_hashes,
uint64_t start_height )
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_block_header_by_hash()

virtual std::shared_ptr< monero_block_header > monero::monero_daemon::get_block_header_by_hash ( const std::string & block_hash)
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_block_header_by_height()

virtual std::shared_ptr< monero_block_header > monero::monero_daemon::get_block_header_by_height ( uint64_t height)
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_block_headers_by_range()

virtual std::vector< std::shared_ptr< monero_block_header > > monero::monero_daemon::get_block_headers_by_range ( uint64_t start_height,
uint64_t end_height )
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_block_template()

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

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 in monero::monero_daemon_rpc.

◆ get_blocks_by_hash()

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

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 in monero::monero_daemon_rpc.

◆ get_blocks_by_height()

virtual std::vector< std::shared_ptr< monero_block > > monero::monero_daemon::get_blocks_by_height ( const std::vector< uint64_t > & heights)
inlinevirtual

Get blocks at the given heights.

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

Reimplemented in monero::monero_daemon_rpc.

◆ get_blocks_by_range()

virtual std::vector< std::shared_ptr< monero_block > > monero::monero_daemon::get_blocks_by_range ( boost::optional< uint64_t > start_height,
boost::optional< uint64_t > end_height )
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_blocks_by_range_chunked()

virtual std::vector< std::shared_ptr< monero_block > > monero::monero_daemon::get_blocks_by_range_chunked ( boost::optional< uint64_t > start_height,
boost::optional< uint64_t > end_height,
boost::optional< uint64_t > max_chunk_size )
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_download_limit()

virtual int monero::monero_daemon::get_download_limit ( )
inlinevirtual

Get the download bandwidth limit.

Returns
is the download bandwidth limit

Reimplemented in monero::monero_daemon_rpc.

◆ get_fee_estimate()

virtual std::shared_ptr< monero_fee_estimate > monero::monero_daemon::get_fee_estimate ( uint64_t grace_blocks = 0)
inlinevirtual

Get mining fee estimates per kB.

Parameters
grace_blocksTODO
Returns
mining fee estimates per kB

Reimplemented in monero::monero_daemon_rpc.

◆ get_hard_fork_info()

virtual std::shared_ptr< monero_hard_fork_info > monero::monero_daemon::get_hard_fork_info ( )
inlinevirtual

Look up information regarding hard fork voting and readiness.

Returns
hard fork information

Reimplemented in monero::monero_daemon_rpc.

◆ get_height()

virtual uint64_t monero::monero_daemon::get_height ( )
inlinevirtual

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

Returns
the number of blocks

Reimplemented in monero::monero_daemon_rpc.

◆ get_info()

virtual std::shared_ptr< monero_daemon_info > monero::monero_daemon::get_info ( )
inlinevirtual

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

Returns
general information about the node and network

Reimplemented in monero::monero_daemon_rpc.

◆ get_key_image_spent_status()

virtual monero_key_image_spent_status monero::monero_daemon::get_key_image_spent_status ( const std::string & key_image)
inlinevirtual

Get the spent status of the given key image.

Parameters
key_imageis key image hex to get the status of
Returns
the status of the key image

◆ get_key_image_spent_statuses()

virtual std::vector< monero_key_image_spent_status > monero::monero_daemon::get_key_image_spent_statuses ( const std::vector< std::string > & key_images)
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_known_peers()

virtual std::vector< std::shared_ptr< monero_peer > > monero::monero_daemon::get_known_peers ( )
inlinevirtual

Get all known peers including their last known online status.

Returns
the daemon's known peers

Reimplemented in monero::monero_daemon_rpc.

◆ get_last_block_header()

virtual std::shared_ptr< monero_block_header > monero::monero_daemon::get_last_block_header ( )
inlinevirtual

Get the last block's header.

Returns
the last block's header

Reimplemented in monero::monero_daemon_rpc.

◆ get_listeners()

virtual std::set< monero_daemon_listener * > monero::monero_daemon::get_listeners ( )
inlinevirtual

Get the listeners registered with the daemon.

Reimplemented in monero::monero_daemon_rpc.

◆ get_miner_tx_sum()

virtual std::shared_ptr< monero_miner_tx_sum > monero::monero_daemon::get_miner_tx_sum ( uint64_t height,
uint64_t num_blocks )
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_mining_status()

virtual std::shared_ptr< monero_mining_status > monero::monero_daemon::get_mining_status ( )
inlinevirtual

Get the daemon's mining status.

Returns
the daemon's mining status

Reimplemented in monero::monero_daemon_rpc.

◆ get_output_distribution()

virtual std::vector< std::shared_ptr< monero_output_distribution_entry > > monero::monero_daemon::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 )
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_output_histogram()

virtual std::vector< std::shared_ptr< monero_output_histogram_entry > > monero::monero_daemon::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 )
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_outputs()

virtual std::vector< std::shared_ptr< monero_output > > monero::monero_daemon::get_outputs ( const std::vector< monero_output > & outputs)
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_peer_bans()

virtual std::vector< std::shared_ptr< monero_ban > > monero::monero_daemon::get_peer_bans ( )
inlinevirtual

Get peer bans.

Returns
entries about banned peers

Reimplemented in monero::monero_daemon_rpc.

◆ get_peers()

virtual std::vector< std::shared_ptr< monero_peer > > monero::monero_daemon::get_peers ( )
inlinevirtual

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

Returns
the daemon's peers

Reimplemented in monero::monero_daemon_rpc.

◆ get_sync_info()

virtual std::shared_ptr< monero_daemon_sync_info > monero::monero_daemon::get_sync_info ( )
inlinevirtual

Get synchronization information.

Returns
contains sync information

Reimplemented in monero::monero_daemon_rpc.

◆ get_tx()

virtual std::shared_ptr< monero_tx > monero::monero_daemon::get_tx ( const std::string & tx_hash,
bool prune = false )
inlinevirtual

Get a transaction by hash.

Parameters
tx_hashis the hash of the transaction to get
prunespecifies if the returned tx should be pruned (defaults to false)
Returns
the transaction with the given hash or null if not found

◆ get_tx_hex()

virtual boost::optional< std::string > monero::monero_daemon::get_tx_hex ( const std::string & tx_hash,
bool prune = false )
inlinevirtual

Get a transaction hex by hash.

Parameters
tx_hashis the hash of the transaction to get hex from
prunespecifies if the returned tx hex should be pruned (defaults to false)
Returns
the tx hex with the given hash

◆ get_tx_hexes()

virtual std::vector< std::string > monero::monero_daemon::get_tx_hexes ( const std::vector< std::string > & tx_hashes,
bool prune = false )
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_tx_pool()

virtual std::vector< std::shared_ptr< monero_tx > > monero::monero_daemon::get_tx_pool ( )
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ get_tx_pool_backlog()

virtual std::vector< monero_tx_backlog_entry > monero::monero_daemon::get_tx_pool_backlog ( )
inlinevirtual

Get all transaction pool backlog.

Returns
transaction pool backlog entries

◆ get_tx_pool_hashes()

virtual std::vector< std::string > monero::monero_daemon::get_tx_pool_hashes ( )
inlinevirtual

Get hashes of transactions in the transaction pool.

Returns
hashes of transactions in the transaction pool

Reimplemented in monero::monero_daemon_rpc.

◆ get_tx_pool_stats()

virtual std::shared_ptr< monero_tx_pool_stats > monero::monero_daemon::get_tx_pool_stats ( )
inlinevirtual

Get transaction pool statistics.

Returns
statistics about the transaction pool

Reimplemented in monero::monero_daemon_rpc.

◆ get_txs()

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

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 in monero::monero_daemon_rpc.

◆ get_upload_limit()

virtual int monero::monero_daemon::get_upload_limit ( )
inlinevirtual

Get the upload bandwidth limit.

Returns
is the upload bandwidth limit

Reimplemented in monero::monero_daemon_rpc.

◆ get_version()

virtual monero_version monero::monero_daemon::get_version ( )
inlinevirtual

Get the daemon's version.

Returns
the daemon's version

Reimplemented in monero::monero_daemon_rpc.

◆ is_trusted()

virtual bool monero::monero_daemon::is_trusted ( )
inlinevirtual

Indicates if the daemon is trusted or untrusted.

Returns
true if the daemon is trusted, false otherwise

Reimplemented in monero::monero_daemon_rpc.

◆ prune_blockchain()

virtual std::shared_ptr< monero_prune_result > monero::monero_daemon::prune_blockchain ( bool check)
inlinevirtual

Prune the blockchain.

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

Reimplemented in monero::monero_daemon_rpc.

◆ relay_tx_by_hash()

virtual void monero::monero_daemon::relay_tx_by_hash ( const std::string & tx_hash)
inlinevirtual

Relays a transaction by hash.

Parameters
tx_hashidentifies the transaction to relay

◆ relay_txs_by_hash()

virtual void monero::monero_daemon::relay_txs_by_hash ( const std::vector< std::string > & tx_hashes)
inlinevirtual

Relays transactions by hash.

Parameters
tx_hashesidentify the transactions to relay

Reimplemented in monero::monero_daemon_rpc.

◆ remove_listener()

virtual void monero::monero_daemon::remove_listener ( monero_daemon_listener & listener)
inlinevirtual

Unregister a listener to receive daemon notifications.

Parameters
listeneris the listener to unregister

Reimplemented in monero::monero_daemon_rpc.

◆ remove_listeners()

virtual void monero::monero_daemon::remove_listeners ( )
inlinevirtual

Remove all listeners registered with the daemon.

Reimplemented in monero::monero_daemon_rpc.

◆ reset_download_limit()

virtual int monero::monero_daemon::reset_download_limit ( )
inlinevirtual

Reset the download bandwidth limit.

Returns
the download bandwidth limit after resetting

Reimplemented in monero::monero_daemon_rpc.

◆ reset_upload_limit()

virtual int monero::monero_daemon::reset_upload_limit ( )
inlinevirtual

Reset the upload bandwidth limit.

Returns
the upload bandwidth limit after resetting

Reimplemented in monero::monero_daemon_rpc.

◆ set_download_limit()

virtual int monero::monero_daemon::set_download_limit ( int limit)
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ set_incoming_peer_limit()

virtual void monero::monero_daemon::set_incoming_peer_limit ( int limit)
inlinevirtual

Limit number of incoming peers.

Parameters
limitis the maximum number of incoming peers

Reimplemented in monero::monero_daemon_rpc.

◆ set_outgoing_peer_limit()

virtual void monero::monero_daemon::set_outgoing_peer_limit ( int limit)
inlinevirtual

Limit number of outgoing peers.

Parameters
limitis the maximum number of outgoing peers

Reimplemented in monero::monero_daemon_rpc.

◆ set_peer_ban()

virtual void monero::monero_daemon::set_peer_ban ( const std::shared_ptr< monero_ban > & ban)
inlinevirtual

Ban a peer node.

Parameters
bancontains information about a node to ban

◆ set_peer_bans()

virtual void monero::monero_daemon::set_peer_bans ( const std::vector< std::shared_ptr< monero_ban > > & bans)
inlinevirtual

Ban peers nodes.

Parameters
bansare bans to apply against peer nodes

Reimplemented in monero::monero_daemon_rpc.

◆ set_upload_limit()

virtual int monero::monero_daemon::set_upload_limit ( int limit)
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ start_mining()

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

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 in monero::monero_daemon_rpc.

◆ stop()

virtual void monero::monero_daemon::stop ( )
inlinevirtual

Safely disconnect and shut down the daemon.

Reimplemented in monero::monero_daemon_rpc.

◆ stop_mining()

virtual void monero::monero_daemon::stop_mining ( )
inlinevirtual

Stop mining.

Reimplemented in monero::monero_daemon_rpc.

◆ submit_block()

virtual void monero::monero_daemon::submit_block ( const std::string & block_blob)
inlinevirtual

Submit a mined block to the network.

Parameters
block_blobis the mined block to submit

◆ submit_blocks()

virtual void monero::monero_daemon::submit_blocks ( const std::vector< std::string > & block_blobs)
inlinevirtual

Submit mined blocks to the network.

Parameters
block_blobsare the mined blocks to submit

Reimplemented in monero::monero_daemon_rpc.

◆ submit_tx_hex()

virtual std::shared_ptr< monero_submit_tx_result > monero::monero_daemon::submit_tx_hex ( const std::string & tx_hex,
bool do_not_relay = false )
inlinevirtual

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 in monero::monero_daemon_rpc.

◆ wait_for_next_block_header()

virtual std::shared_ptr< monero_block_header > monero::monero_daemon::wait_for_next_block_header ( )
inlinevirtual

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

Returns
the header of the next block added to the chain

Reimplemented in monero::monero_daemon_rpc.


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