Monero C++ Library
Loading...
Searching...
No Matches
monero::monero_block Struct Reference

#include <monero_daemon_model.h>

Inheritance diagram for monero::monero_block:
monero::monero_block_header monero::serializable_struct

Public Member Functions

rapidjson::Value to_rapidjson_val (rapidjson::Document::AllocatorType &allocator) const
 
std::shared_ptr< monero_blockcopy (const std::shared_ptr< monero_block > &src, const std::shared_ptr< monero_block > &tgt) const
 
void merge (const std::shared_ptr< monero_block_header > &self, const std::shared_ptr< monero_block_header > &other)
 
void merge (const std::shared_ptr< monero_block > &self, const std::shared_ptr< monero_block > &other)
 
- Public Member Functions inherited from monero::monero_block_header
rapidjson::Value to_rapidjson_val (rapidjson::Document::AllocatorType &allocator) const
 
std::shared_ptr< monero_block_headercopy (const std::shared_ptr< monero_block_header > &src, const std::shared_ptr< monero_block_header > &tgt) const
 
- Public Member Functions inherited from monero::serializable_struct
std::string serialize () const
 

Public Attributes

boost::optional< std::string > m_hex
 
boost::optional< std::shared_ptr< monero_tx > > m_miner_tx
 
std::vector< std::shared_ptr< monero_tx > > m_txs
 
std::vector< std::string > m_tx_hashes
 
- Public Attributes inherited from monero::monero_block_header
boost::optional< std::string > m_hash
 
boost::optional< uint64_t > m_height
 
boost::optional< uint64_t > m_timestamp
 
boost::optional< uint64_t > m_size
 
boost::optional< uint64_t > m_weight
 
boost::optional< uint64_t > m_long_term_weight
 
boost::optional< uint64_t > m_depth
 
boost::optional< uint64_t > m_difficulty
 
boost::optional< uint64_t > m_cumulative_difficulty
 
boost::optional< uint32_t > m_major_version
 
boost::optional< uint32_t > m_minor_version
 
boost::optional< uint32_t > m_nonce
 
boost::optional< std::string > m_miner_tx_hash
 
boost::optional< uint32_t > m_num_txs
 
boost::optional< bool > m_orphan_status
 
boost::optional< std::string > m_prev_hash
 
boost::optional< uint64_t > m_reward
 
boost::optional< std::string > m_pow_hash
 

Detailed Description

Models a Monero block in the blockchain.

Member Function Documentation

◆ merge()

void monero::monero_block::merge ( const std::shared_ptr< monero_block_header > & self,
const std::shared_ptr< monero_block_header > & other )
virtual

Reimplemented from monero::monero_block_header.

◆ to_rapidjson_val()

rapidjson::Value monero::monero_block::to_rapidjson_val ( rapidjson::Document::AllocatorType & allocator) const
virtual

Converts the struct to a rapidjson Value.

Parameters
allocatoris the rapidjson document allocator
Returns
the struct as a rapidjson Value

Implements monero::serializable_struct.


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