|
Electroneum
|
#include <chaingen.h>
Classes | |
| struct | block_info |
Public Types | |
| enum | block_fields { bf_none = 0, bf_major_ver = 1 << 0, bf_minor_ver = 1 << 1, bf_timestamp = 1 << 2, bf_prev_id = 1 << 3, bf_miner_tx = 1 << 4, bf_tx_hashes = 1 << 5, bf_diffic = 1 << 6, bf_max_outs = 1 << 7, bf_hf_version = 1 << 8 } |
Public Member Functions | |
| test_generator () | |
| test_generator (const test_generator &other) | |
| void | get_block_chain (std::vector< block_info > &blockchain, const crypto::hash &head, size_t n) const |
| void | get_last_n_block_weights (std::vector< size_t > &block_weights, const crypto::hash &head, size_t n) const |
| uint64_t | get_already_generated_coins (const crypto::hash &blk_id) const |
| uint64_t | get_already_generated_coins (const cryptonote::block &blk) const |
| void | add_block (const cryptonote::block &blk, size_t tsx_size, std::vector< size_t > &block_weights, uint64_t already_generated_coins, uint8_t hf_version=1) |
| bool | construct_block (cryptonote::block &blk, uint64_t height, const crypto::hash &prev_id, const cryptonote::account_base &miner_acc, uint64_t timestamp, uint64_t already_generated_coins, std::vector< size_t > &block_weights, const std::list< cryptonote::transaction > &tx_list, const boost::optional< uint8_t > &hf_ver=boost::none) |
| bool | construct_block (cryptonote::block &blk, const cryptonote::account_base &miner_acc, uint64_t timestamp) |
| bool | construct_block (cryptonote::block &blk, const cryptonote::block &blk_prev, const cryptonote::account_base &miner_acc, const std::list< cryptonote::transaction > &tx_list=std::list< cryptonote::transaction >(), const boost::optional< uint8_t > &hf_ver=boost::none) |
| bool | construct_block_manually (cryptonote::block &blk, const cryptonote::block &prev_block, const cryptonote::account_base &miner_acc, int actual_params=bf_none, uint8_t major_ver=0, uint8_t minor_ver=0, uint64_t timestamp=0, const crypto::hash &prev_id=crypto::hash(), const cryptonote::difficulty_type &diffic=1, const cryptonote::transaction &miner_tx=cryptonote::transaction(), const std::vector< crypto::hash > &tx_hashes=std::vector< crypto::hash >(), size_t txs_sizes=0, size_t max_outs=999, uint8_t hf_version=1) |
| bool | construct_block_manually_tx (cryptonote::block &blk, const cryptonote::block &prev_block, const cryptonote::account_base &miner_acc, const std::vector< crypto::hash > &tx_hashes, size_t txs_size) |
Friends | |
| class | boost::serialization::access |
Definition at line 182 of file chaingen.h.
| Enumerator | |
|---|---|
| bf_none | |
| bf_major_ver | |
| bf_minor_ver | |
| bf_timestamp | |
| bf_prev_id | |
| bf_miner_tx | |
| bf_tx_hashes | |
| bf_diffic | |
| bf_max_outs | |
| bf_hf_version | |
Definition at line 217 of file chaingen.h.
|
inline |
Definition at line 231 of file chaingen.h.
|
inline |
Definition at line 232 of file chaingen.h.
| void test_generator::add_block | ( | const cryptonote::block & | blk, |
| size_t | tsx_size, | ||
| std::vector< size_t > & | block_weights, | ||
| uint64_t | already_generated_coins, | ||
| uint8_t | hf_version = 1 |
||
| ) |
Definition at line 104 of file chaingen.cpp.

| bool test_generator::construct_block | ( | cryptonote::block & | blk, |
| uint64_t | height, | ||
| const crypto::hash & | prev_id, | ||
| const cryptonote::account_base & | miner_acc, | ||
| uint64_t | timestamp, | ||
| uint64_t | already_generated_coins, | ||
| std::vector< size_t > & | block_weights, | ||
| const std::list< cryptonote::transaction > & | tx_list, | ||
| const boost::optional< uint8_t > & | hf_ver = boost::none |
||
| ) |
Definition at line 112 of file chaingen.cpp.

| bool test_generator::construct_block | ( | cryptonote::block & | blk, |
| const cryptonote::account_base & | miner_acc, | ||
| uint64_t | timestamp | ||
| ) |
Definition at line 198 of file chaingen.cpp.
| bool test_generator::construct_block | ( | cryptonote::block & | blk, |
| const cryptonote::block & | blk_prev, | ||
| const cryptonote::account_base & | miner_acc, | ||
| const std::list< cryptonote::transaction > & | tx_list = std::list<cryptonote::transaction>(), |
||
| const boost::optional< uint8_t > & | hf_ver = boost::none |
||
| ) |
Definition at line 205 of file chaingen.cpp.

| bool test_generator::construct_block_manually | ( | cryptonote::block & | blk, |
| const cryptonote::block & | prev_block, | ||
| const cryptonote::account_base & | miner_acc, | ||
| int | actual_params = bf_none, |
||
| uint8_t | major_ver = 0, |
||
| uint8_t | minor_ver = 0, |
||
| uint64_t | timestamp = 0, |
||
| const crypto::hash & | prev_id = crypto::hash(), |
||
| const cryptonote::difficulty_type & | diffic = 1, |
||
| const cryptonote::transaction & | miner_tx = cryptonote::transaction(), |
||
| const std::vector< crypto::hash > & | tx_hashes = std::vector<crypto::hash>(), |
||
| size_t | txs_sizes = 0, |
||
| size_t | max_outs = 999, |
||
| uint8_t | hf_version = 1 |
||
| ) |
Definition at line 221 of file chaingen.cpp.


| bool test_generator::construct_block_manually_tx | ( | cryptonote::block & | blk, |
| const cryptonote::block & | prev_block, | ||
| const cryptonote::account_base & | miner_acc, | ||
| const std::vector< crypto::hash > & | tx_hashes, | ||
| size_t | txs_size | ||
| ) |
Definition at line 263 of file chaingen.cpp.

| uint64_t test_generator::get_already_generated_coins | ( | const crypto::hash & | blk_id | ) | const |
| uint64_t test_generator::get_already_generated_coins | ( | const cryptonote::block & | blk | ) | const |
Definition at line 97 of file chaingen.cpp.

| void test_generator::get_block_chain | ( | std::vector< block_info > & | blockchain, |
| const crypto::hash & | head, | ||
| size_t | n | ||
| ) | const |
Definition at line 60 of file chaingen.cpp.
| void test_generator::get_last_n_block_weights | ( | std::vector< size_t > & | block_weights, |
| const crypto::hash & | head, | ||
| size_t | n | ||
| ) | const |
Definition at line 78 of file chaingen.cpp.

|
friend |
Definition at line 261 of file chaingen.h.