Electroneum
gen_block_accepted_base< expected_blockchain_height > Struct Template Reference

#include <block_validation.h>

Inheritance diagram for gen_block_accepted_base< expected_blockchain_height >:
Collaboration diagram for gen_block_accepted_base< expected_blockchain_height >:

Public Member Functions

 gen_block_accepted_base ()
 
bool check_block_accepted (cryptonote::core &c, size_t, const std::vector< test_event_entry > &)
 
- Public Member Functions inherited from test_chain_unit_base
void register_callback (const std::string &cb_name, verify_callback cb)
 
bool verify (const std::string &cb_name, cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)
 
bool check_block_verification_context (const cryptonote::block_verification_context &bvc, size_t event_idx, const cryptonote::block &)
 
bool check_tx_verification_context (const cryptonote::tx_verification_context &tvc, bool, size_t, const cryptonote::transaction &)
 
bool check_tx_verification_context_array (const std::vector< cryptonote::tx_verification_context > &tvcs, size_t, size_t, const std::vector< cryptonote::transaction > &)
 

Additional Inherited Members

- Public Types inherited from test_chain_unit_base
typedef boost::function< bool(cryptonote::core &c, size_t ev_index, const std::vector< test_event_entry > &events)> verify_callback
 
typedef std::map< std::string, verify_callbackcallbacks_map
 

Detailed Description

template<size_t expected_blockchain_height>
struct gen_block_accepted_base< expected_blockchain_height >

Definition at line 65 of file block_validation.h.

Constructor & Destructor Documentation

◆ gen_block_accepted_base()

template<size_t expected_blockchain_height>
gen_block_accepted_base< expected_blockchain_height >::gen_block_accepted_base ( )
inline

Definition at line 67 of file block_validation.h.

68  {
70  }
#define REGISTER_CALLBACK(CB_NAME, CLBACK)
Definition: chaingen.h:827
bool check_block_accepted(cryptonote::core &c, size_t, const std::vector< test_event_entry > &)

Member Function Documentation

◆ check_block_accepted()

template<size_t expected_blockchain_height>
bool gen_block_accepted_base< expected_blockchain_height >::check_block_accepted ( cryptonote::core c,
size_t  ,
const std::vector< test_event_entry > &   
)
inline

Definition at line 72 of file block_validation.h.

73  {
74  DEFINE_TESTS_ERROR_CONTEXT("gen_block_accepted_base::check_block_accepted");
75 
77  CHECK_EQ(expected_blockchain_height, c.get_current_blockchain_height());
78 
79  return true;
80  }
uint64_t get_current_blockchain_height() const
get the current height of the blockchain
size_t get_pool_transactions_count() const
get the total number of transactions in the pool
#define CHECK_EQ(v1, v2)
Definition: chaingen.h:1058
#define DEFINE_TESTS_ERROR_CONTEXT(text)
Definition: chaingen.h:1056
Here is the caller graph for this function:

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