Monero
Public Member Functions | Private Member Functions | Private Attributes | List of all members
tests::proxy_core Class Reference

#include <core_proxy.h>

Inheritance diagram for tests::proxy_core:
Inheritance graph
[legend]
Collaboration diagram for tests::proxy_core:
Collaboration graph
[legend]

Public Member Functions

virtual bool is_synchronized () const final
 
void on_synchronized ()
 
void safesyncmode (const bool)
 
virtual uint64_t get_current_blockchain_height () const final
 
void set_target_blockchain_height (uint64_t)
 
bool init (const boost::program_options::variables_map &vm)
 
bool deinit ()
 
bool get_short_chain_history (std::list< crypto::hash > &ids)
 
bool have_block (const crypto::hash &id, int *where=NULL)
 
bool have_block_unlocked (const crypto::hash &id, int *where=NULL)
 
void get_blockchain_top (uint64_t &height, crypto::hash &top_id)
 
bool handle_incoming_tx (const cryptonote::tx_blob_entry &tx_blob, cryptonote::tx_verification_context &tvc, cryptonote::relay_method tx_relay, bool relayed)
 
bool handle_incoming_txs (const std::vector< cryptonote::tx_blob_entry > &tx_blobs, std::vector< cryptonote::tx_verification_context > &tvc, cryptonote::relay_method tx_relay, bool relayed)
 
bool handle_incoming_block (const cryptonote::blobdata &block_blob, const cryptonote::block *block, cryptonote::block_verification_context &bvc, bool update_miner_blocktemplate=true)
 
void pause_mine ()
 
void resume_mine ()
 
bool on_idle ()
 
bool find_blockchain_supplement (const std::list< crypto::hash > &qblock_ids, bool clip_pruned, cryptonote::NOTIFY_RESPONSE_CHAIN_ENTRY::request &resp)
 
bool handle_get_objects (cryptonote::NOTIFY_REQUEST_GET_OBJECTS::request &arg, cryptonote::NOTIFY_RESPONSE_GET_OBJECTS::request &rsp, cryptonote::cryptonote_connection_context &context)
 
cryptonote::Blockchainget_blockchain_storage ()
 
bool get_test_drop_download ()
 
bool get_test_drop_download_height ()
 
bool prepare_handle_incoming_blocks (const std::vector< cryptonote::block_complete_entry > &blocks_entry, std::vector< cryptonote::block > &blocks)
 
bool cleanup_handle_incoming_blocks (bool force_sync=false)
 
bool update_checkpoints (const bool skip_dns=false)
 
uint64_t get_target_blockchain_height () const
 
size_t get_block_sync_size (uint64_t height) const
 
virtual void on_transactions_relayed (epee::span< const cryptonote::blobdata > tx_blobs, cryptonote::relay_method tx_relay)
 
cryptonote::network_type get_nettype () const
 
bool get_pool_transaction (const crypto::hash &id, cryptonote::blobdata &tx_blob, cryptonote::relay_category tx_category) const
 
bool pool_has_tx (const crypto::hash &txid) const
 
bool get_blocks (uint64_t start_offset, size_t count, std::vector< std::pair< cryptonote::blobdata, cryptonote::block >> &blocks, std::vector< cryptonote::blobdata > &txs) const
 
bool get_transactions (const std::vector< crypto::hash > &txs_ids, std::vector< cryptonote::transaction > &txs, std::vector< crypto::hash > &missed_txs) const
 
bool get_block_by_hash (const crypto::hash &h, cryptonote::block &blk, bool *orphan=NULL) const
 
uint8_t get_ideal_hard_fork_version () const
 
uint8_t get_ideal_hard_fork_version (uint64_t height) const
 
uint8_t get_hard_fork_version (uint64_t height) const
 
uint64_t get_earliest_ideal_height_for_version (uint8_t version) const
 
cryptonote::difficulty_type get_block_cumulative_difficulty (uint64_t height) const
 
bool fluffy_blocks_enabled () const
 
uint64_t prevalidate_block_hashes (uint64_t height, const std::vector< crypto::hash > &hashes, const std::vector< uint64_t > &weights)
 
bool has_block_weights (uint64_t height, uint64_t nblocks) const
 
bool is_within_compiled_block_hash_area (uint64_t height) const
 
bool pad_transactions () const
 
uint32_t get_blockchain_pruning_seed () const
 
bool prune_blockchain (uint32_t pruning_seed) const
 
bool get_txpool_complement (const std::vector< crypto::hash > &hashes, std::vector< cryptonote::blobdata > &txes)
 
bool get_pool_transaction_hashes (std::vector< crypto::hash > &txs, bool include_unrelayed_txes=true) const
 
crypto::hash get_block_id_by_height (uint64_t height) const
 
- Public Member Functions inherited from cryptonote::i_core_events
virtual ~i_core_events () noexcept
 

Private Member Functions

bool add_block (const crypto::hash &_id, const crypto::hash &_longhash, const cryptonote::block &_blk, const cryptonote::blobdata &_blob)
 
void build_short_history (std::list< crypto::hash > &m_history, const crypto::hash &m_start)
 

Private Attributes

cryptonote::block m_genesis
 
std::list< crypto::hashm_known_block_list
 
std::unordered_map< crypto::hash, block_indexm_hash2blkidx
 
crypto::hash m_lastblk
 
std::list< cryptonote::transactiontxes
 

Member Function Documentation

◆ add_block()

bool tests::proxy_core::add_block ( const crypto::hash _id,
const crypto::hash _longhash,
const cryptonote::block _blk,
const cryptonote::blobdata _blob 
)
private

◆ build_short_history()

void tests::proxy_core::build_short_history ( std::list< crypto::hash > &  m_history,
const crypto::hash m_start 
)
private

◆ cleanup_handle_incoming_blocks()

bool tests::proxy_core::cleanup_handle_incoming_blocks ( bool  force_sync = false)
inline

◆ deinit()

bool tests::proxy_core::deinit ( )
inline

◆ find_blockchain_supplement()

bool tests::proxy_core::find_blockchain_supplement ( const std::list< crypto::hash > &  qblock_ids,
bool  clip_pruned,
cryptonote::NOTIFY_RESPONSE_CHAIN_ENTRY::request resp 
)
inline

◆ fluffy_blocks_enabled()

bool tests::proxy_core::fluffy_blocks_enabled ( ) const
inline

◆ get_block_by_hash()

bool tests::proxy_core::get_block_by_hash ( const crypto::hash h,
cryptonote::block blk,
bool orphan = NULL 
) const
inline

◆ get_block_cumulative_difficulty()

cryptonote::difficulty_type tests::proxy_core::get_block_cumulative_difficulty ( uint64_t  height) const
inline

◆ get_block_id_by_height()

crypto::hash tests::proxy_core::get_block_id_by_height ( uint64_t  height) const
inline

◆ get_block_sync_size()

size_t tests::proxy_core::get_block_sync_size ( uint64_t  height) const
inline

◆ get_blockchain_pruning_seed()

uint32_t tests::proxy_core::get_blockchain_pruning_seed ( ) const
inline

◆ get_blockchain_storage()

cryptonote::Blockchain& tests::proxy_core::get_blockchain_storage ( )
inline

◆ get_blockchain_top()

void tests::proxy_core::get_blockchain_top ( uint64_t height,
crypto::hash top_id 
)

◆ get_blocks()

bool tests::proxy_core::get_blocks ( uint64_t  start_offset,
size_t  count,
std::vector< std::pair< cryptonote::blobdata, cryptonote::block >> &  blocks,
std::vector< cryptonote::blobdata > &  txs 
) const
inline

◆ get_current_blockchain_height()

virtual uint64_t tests::proxy_core::get_current_blockchain_height ( ) const
inlinefinalvirtual

◆ get_earliest_ideal_height_for_version()

uint64_t tests::proxy_core::get_earliest_ideal_height_for_version ( uint8_t  version) const
inline

◆ get_hard_fork_version()

uint8_t tests::proxy_core::get_hard_fork_version ( uint64_t  height) const
inline

◆ get_ideal_hard_fork_version() [1/2]

uint8_t tests::proxy_core::get_ideal_hard_fork_version ( ) const
inline

◆ get_ideal_hard_fork_version() [2/2]

uint8_t tests::proxy_core::get_ideal_hard_fork_version ( uint64_t  height) const
inline

◆ get_nettype()

cryptonote::network_type tests::proxy_core::get_nettype ( ) const
inline

◆ get_pool_transaction()

bool tests::proxy_core::get_pool_transaction ( const crypto::hash id,
cryptonote::blobdata tx_blob,
cryptonote::relay_category  tx_category 
) const
inline

◆ get_pool_transaction_hashes()

bool tests::proxy_core::get_pool_transaction_hashes ( std::vector< crypto::hash > &  txs,
bool  include_unrelayed_txes = true 
) const
inline

◆ get_short_chain_history()

bool tests::proxy_core::get_short_chain_history ( std::list< crypto::hash > &  ids)

◆ get_target_blockchain_height()

uint64_t tests::proxy_core::get_target_blockchain_height ( ) const
inline

◆ get_test_drop_download()

bool tests::proxy_core::get_test_drop_download ( )
inline

◆ get_test_drop_download_height()

bool tests::proxy_core::get_test_drop_download_height ( )
inline

◆ get_transactions()

bool tests::proxy_core::get_transactions ( const std::vector< crypto::hash > &  txs_ids,
std::vector< cryptonote::transaction > &  txs,
std::vector< crypto::hash > &  missed_txs 
) const
inline

◆ get_txpool_complement()

bool tests::proxy_core::get_txpool_complement ( const std::vector< crypto::hash > &  hashes,
std::vector< cryptonote::blobdata > &  txes 
)
inline

◆ handle_get_objects()

◆ handle_incoming_block()

bool tests::proxy_core::handle_incoming_block ( const cryptonote::blobdata block_blob,
const cryptonote::block block,
cryptonote::block_verification_context bvc,
bool  update_miner_blocktemplate = true 
)

◆ handle_incoming_tx()

bool tests::proxy_core::handle_incoming_tx ( const cryptonote::tx_blob_entry tx_blob,
cryptonote::tx_verification_context tvc,
cryptonote::relay_method  tx_relay,
bool  relayed 
)

◆ handle_incoming_txs()

bool tests::proxy_core::handle_incoming_txs ( const std::vector< cryptonote::tx_blob_entry > &  tx_blobs,
std::vector< cryptonote::tx_verification_context > &  tvc,
cryptonote::relay_method  tx_relay,
bool  relayed 
)

◆ has_block_weights()

bool tests::proxy_core::has_block_weights ( uint64_t  height,
uint64_t  nblocks 
) const
inline

◆ have_block()

bool tests::proxy_core::have_block ( const crypto::hash id,
int *  where = NULL 
)

◆ have_block_unlocked()

bool tests::proxy_core::have_block_unlocked ( const crypto::hash id,
int *  where = NULL 
)

◆ init()

bool tests::proxy_core::init ( const boost::program_options::variables_map &  vm)

◆ is_synchronized()

virtual bool tests::proxy_core::is_synchronized ( ) const
inlinefinalvirtual

◆ is_within_compiled_block_hash_area()

bool tests::proxy_core::is_within_compiled_block_hash_area ( uint64_t  height) const
inline

◆ on_idle()

bool tests::proxy_core::on_idle ( )
inline

◆ on_synchronized()

void tests::proxy_core::on_synchronized ( )
inline

◆ on_transactions_relayed()

virtual void tests::proxy_core::on_transactions_relayed ( epee::span< const cryptonote::blobdata tx_blobs,
cryptonote::relay_method  tx_relay 
)
inlinevirtual

◆ pad_transactions()

bool tests::proxy_core::pad_transactions ( ) const
inline

◆ pause_mine()

void tests::proxy_core::pause_mine ( )
inline

◆ pool_has_tx()

bool tests::proxy_core::pool_has_tx ( const crypto::hash txid) const
inline

◆ prepare_handle_incoming_blocks()

bool tests::proxy_core::prepare_handle_incoming_blocks ( const std::vector< cryptonote::block_complete_entry > &  blocks_entry,
std::vector< cryptonote::block > &  blocks 
)
inline

◆ prevalidate_block_hashes()

uint64_t tests::proxy_core::prevalidate_block_hashes ( uint64_t  height,
const std::vector< crypto::hash > &  hashes,
const std::vector< uint64_t > &  weights 
)
inline

◆ prune_blockchain()

bool tests::proxy_core::prune_blockchain ( uint32_t  pruning_seed) const
inline

◆ resume_mine()

void tests::proxy_core::resume_mine ( )
inline

◆ safesyncmode()

void tests::proxy_core::safesyncmode ( const bool  )
inline

◆ set_target_blockchain_height()

void tests::proxy_core::set_target_blockchain_height ( uint64_t  )
inline

◆ update_checkpoints()

bool tests::proxy_core::update_checkpoints ( const bool  skip_dns = false)
inline

Member Data Documentation

◆ m_genesis

cryptonote::block tests::proxy_core::m_genesis
private

◆ m_hash2blkidx

std::unordered_map<crypto::hash, block_index> tests::proxy_core::m_hash2blkidx
private

◆ m_known_block_list

std::list<crypto::hash> tests::proxy_core::m_known_block_list
private

◆ m_lastblk

crypto::hash tests::proxy_core::m_lastblk
private

◆ txes

std::list<cryptonote::transaction> tests::proxy_core::txes
private

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