Electroneum
Loading...
Searching...
No Matches
test_core Class Reference

Public Member Functions

void on_synchronized ()
void safesyncmode (const bool)
uint64_t get_current_blockchain_height () const
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) const
bool get_stat_info (cryptonote::core_stat_info &st_inf) const
bool have_block (const crypto::hash &id) const
void get_blockchain_top (uint64_t &height, crypto::hash &top_id) const
bool handle_incoming_tx (const cryptonote::blobdata &tx_blob, cryptonote::tx_verification_context &tvc, bool keeped_by_block, bool relayed, bool do_not_relay)
bool handle_incoming_txs (const std::vector< cryptonote::blobdata > &tx_blob, std::vector< cryptonote::tx_verification_context > &tvc, bool keeped_by_block, bool relayed, bool do_not_relay)
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, 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::blockchain_storage & get_blockchain_storage ()
bool get_test_drop_download () const
bool get_test_drop_download_height () const
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)
uint64_t get_target_blockchain_height () const
size_t get_block_sync_size (uint64_t height) const
virtual void on_transaction_relayed (const cryptonote::blobdata &tx)
cryptonote::network_type get_nettype () const
bool get_pool_transaction (const crypto::hash &id, cryptonote::blobdata &tx_blob) 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)
bool pad_transactions ()
uint32_t get_blockchain_pruning_seed () const
bool prune_blockchain (uint32_t pruning_seed=0)
void stop ()
void set_block_cumulative_difficulty (uint64_t height, cryptonote::difficulty_type diff)
electroneum::basic::list_update_outcome set_validators_list (std::string v_list, bool isEmergencyUpdate=false)
bool isValidatorsListValid ()
std::string get_validators_list ()

Detailed Description

Definition at line 44 of file ban.cpp.

Member Function Documentation

◆ cleanup_handle_incoming_blocks()

bool test_core::cleanup_handle_incoming_blocks ( bool force_sync = false)
inline

Definition at line 69 of file ban.cpp.

69{ return true; }

◆ deinit()

bool test_core::deinit ( )
inline

Definition at line 52 of file ban.cpp.

52{return true;}

◆ find_blockchain_supplement()

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

Definition at line 63 of file ban.cpp.

63{return true;}

◆ fluffy_blocks_enabled()

bool test_core::fluffy_blocks_enabled ( ) const
inline

Definition at line 84 of file ban.cpp.

84{ return false; }

◆ get_block_by_hash()

bool test_core::get_block_by_hash ( const crypto::hash & h,
cryptonote::block & blk,
bool * orphan = NULL ) const
inline

Definition at line 78 of file ban.cpp.

78{ return false; }

◆ get_block_cumulative_difficulty()

cryptonote::difficulty_type test_core::get_block_cumulative_difficulty ( uint64_t height) const
inline

Definition at line 83 of file ban.cpp.

83{ return 0; }

◆ get_block_sync_size()

size_t test_core::get_block_sync_size ( uint64_t height) const
inline

Definition at line 71 of file ban.cpp.

#define BLOCKS_SYNCHRONIZING_DEFAULT_COUNT

◆ get_blockchain_pruning_seed()

uint32_t test_core::get_blockchain_pruning_seed ( ) const
inline

Definition at line 87 of file ban.cpp.

87{ return 0; }

◆ get_blockchain_storage()

cryptonote::blockchain_storage & test_core::get_blockchain_storage ( )
inline

Definition at line 65 of file ban.cpp.

65{ throw std::runtime_error("Called invalid member function: please never call get_blockchain_storage on the TESTING class test_core."); }

◆ get_blockchain_top()

void test_core::get_blockchain_top ( uint64_t & height,
crypto::hash & top_id ) const
inline

Definition at line 56 of file ban.cpp.

56{height=0;top_id=crypto::null_hash;}
uint64_t height

◆ get_blocks()

bool test_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

Definition at line 76 of file ban.cpp.

76{ return false; }

◆ get_current_blockchain_height()

uint64_t test_core::get_current_blockchain_height ( ) const
inline

Definition at line 49 of file ban.cpp.

49{return 1;}

◆ get_earliest_ideal_height_for_version()

uint64_t test_core::get_earliest_ideal_height_for_version ( uint8_t version) const
inline

Definition at line 82 of file ban.cpp.

82{ return 0; }

◆ get_hard_fork_version()

uint8_t test_core::get_hard_fork_version ( uint64_t height) const
inline

Definition at line 81 of file ban.cpp.

81{ return 0; }

◆ get_ideal_hard_fork_version() [1/2]

uint8_t test_core::get_ideal_hard_fork_version ( ) const
inline

Definition at line 79 of file ban.cpp.

79{ return 0; }

◆ get_ideal_hard_fork_version() [2/2]

uint8_t test_core::get_ideal_hard_fork_version ( uint64_t height) const
inline

Definition at line 80 of file ban.cpp.

80{ return 0; }

◆ get_nettype()

cryptonote::network_type test_core::get_nettype ( ) const
inline

Definition at line 73 of file ban.cpp.

◆ get_pool_transaction()

bool test_core::get_pool_transaction ( const crypto::hash & id,
cryptonote::blobdata & tx_blob ) const
inline

Definition at line 74 of file ban.cpp.

74{ return false; }

◆ get_short_chain_history()

bool test_core::get_short_chain_history ( std::list< crypto::hash > & ids) const
inline

Definition at line 53 of file ban.cpp.

53{ return true; }

◆ get_stat_info()

bool test_core::get_stat_info ( cryptonote::core_stat_info & st_inf) const
inline

Definition at line 54 of file ban.cpp.

54{return true;}

◆ get_target_blockchain_height()

uint64_t test_core::get_target_blockchain_height ( ) const
inline

Definition at line 70 of file ban.cpp.

70{ return 1; }

◆ get_test_drop_download()

bool test_core::get_test_drop_download ( ) const
inline

Definition at line 66 of file ban.cpp.

66{return true;}

◆ get_test_drop_download_height()

bool test_core::get_test_drop_download_height ( ) const
inline

Definition at line 67 of file ban.cpp.

67{return true;}

◆ get_transactions()

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

Definition at line 77 of file ban.cpp.

77{ return false; }

◆ get_validators_list()

std::string test_core::get_validators_list ( )
inline

Definition at line 93 of file ban.cpp.

93{ return ""; }

◆ handle_get_objects()

Definition at line 64 of file ban.cpp.

64{return true;}

◆ handle_incoming_block()

bool test_core::handle_incoming_block ( const cryptonote::blobdata & block_blob,
const cryptonote::block * block,
cryptonote::block_verification_context & bvc,
bool update_miner_blocktemplate = true )
inline

Definition at line 59 of file ban.cpp.

59{ return true; }

◆ handle_incoming_tx()

bool test_core::handle_incoming_tx ( const cryptonote::blobdata & tx_blob,
cryptonote::tx_verification_context & tvc,
bool keeped_by_block,
bool relayed,
bool do_not_relay )
inline

Definition at line 57 of file ban.cpp.

57{ return true; }

◆ handle_incoming_txs()

bool test_core::handle_incoming_txs ( const std::vector< cryptonote::blobdata > & tx_blob,
std::vector< cryptonote::tx_verification_context > & tvc,
bool keeped_by_block,
bool relayed,
bool do_not_relay )
inline

Definition at line 58 of file ban.cpp.

58{ return true; }

◆ have_block()

bool test_core::have_block ( const crypto::hash & id) const
inline

Definition at line 55 of file ban.cpp.

55{return true;}

◆ init()

bool test_core::init ( const boost::program_options::variables_map & vm)
inline

Definition at line 51 of file ban.cpp.

51{return true ;}
#define true

◆ isValidatorsListValid()

bool test_core::isValidatorsListValid ( )
inline

Definition at line 92 of file ban.cpp.

92{ return true; }

◆ on_idle()

bool test_core::on_idle ( )
inline

Definition at line 62 of file ban.cpp.

62{return true;}

◆ on_synchronized()

void test_core::on_synchronized ( )
inline

Definition at line 47 of file ban.cpp.

47{}

◆ on_transaction_relayed()

virtual void test_core::on_transaction_relayed ( const cryptonote::blobdata & tx)
inlinevirtual

Definition at line 72 of file ban.cpp.

72{}

◆ pad_transactions()

bool test_core::pad_transactions ( )
inline

Definition at line 86 of file ban.cpp.

86{ return false; }

◆ pause_mine()

void test_core::pause_mine ( )
inline

Definition at line 60 of file ban.cpp.

60{}

◆ pool_has_tx()

bool test_core::pool_has_tx ( const crypto::hash & txid) const
inline

Definition at line 75 of file ban.cpp.

75{ return false; }

◆ prepare_handle_incoming_blocks()

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

Definition at line 68 of file ban.cpp.

68{ return true; }

◆ prevalidate_block_hashes()

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

Definition at line 85 of file ban.cpp.

85{ return 0; }

◆ prune_blockchain()

bool test_core::prune_blockchain ( uint32_t pruning_seed = 0)
inline

Definition at line 88 of file ban.cpp.

88{ return true; }

◆ resume_mine()

void test_core::resume_mine ( )
inline

Definition at line 61 of file ban.cpp.

61{}

◆ safesyncmode()

void test_core::safesyncmode ( const bool )
inline

Definition at line 48 of file ban.cpp.

48{}

◆ set_block_cumulative_difficulty()

void test_core::set_block_cumulative_difficulty ( uint64_t height,
cryptonote::difficulty_type diff )
inline

Definition at line 90 of file ban.cpp.

90{}

◆ set_target_blockchain_height()

void test_core::set_target_blockchain_height ( uint64_t )
inline

Definition at line 50 of file ban.cpp.

50{}

◆ set_validators_list()

electroneum::basic::list_update_outcome test_core::set_validators_list ( std::string v_list,
bool isEmergencyUpdate = false )
inline

◆ stop()

void test_core::stop ( )
inline

Definition at line 89 of file ban.cpp.

89{}

The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/tests/unit_tests/ban.cpp