Monero
Namespaces | Macros | Functions | Variables
blockchain.cpp File Reference
#include <algorithm>
#include <cstdio>
#include <boost/filesystem.hpp>
#include <boost/range/adaptor/reversed.hpp>
#include "include_base_utils.h"
#include "cryptonote_basic/cryptonote_basic_impl.h"
#include "tx_pool.h"
#include "blockchain.h"
#include "blockchain_db/blockchain_db.h"
#include "cryptonote_basic/cryptonote_boost_serialization.h"
#include "cryptonote_config.h"
#include "cryptonote_basic/miner.h"
#include "misc_language.h"
#include "profile_tools.h"
#include "file_io_utils.h"
#include "common/int-util.h"
#include "common/threadpool.h"
#include "common/boost_serialization_helper.h"
#include "warnings.h"
#include "crypto/hash.h"
#include "cryptonote_core.h"
#include "ringct/rctSigs.h"
#include "common/perf_timer.h"
Include dependency graph for blockchain.cpp:

Namespaces

 cryptonote
 Holds cryptonote related classes and helpers.
 

Macros

#define MONERO_DEFAULT_LOG_CATEGORY   "blockchain"
 
#define FIND_BLOCKCHAIN_SUPPLEMENT_MAX_SIZE   (100*1024*1024)
 
#define MERROR_VER(x)   MCERROR("verify", x)
 
#define BLOCK_REWARD_OVERESTIMATE   (10 * 1000000000000)
 
#define SCAN_TABLE_QUIT(m)
 

Functions

void slow_hash_allocate_state ()
 
void slow_hash_free_state ()
 
template<typename T >
void reserve_container (std::vector< T > &v, size_t N)
 
template<typename T >
void reserve_container (std::list< T > &v, size_t N)
 

Variables

struct {
   uint8_t   version
 
   uint64_t   height
 
   uint8_t   threshold
 
   time_t   time
 
mainnet_hard_forks []
 
static const uint64_t mainnet_hard_fork_version_1_till = 1009826
 
struct {
   uint8_t   version
 
   uint64_t   height
 
   uint8_t   threshold
 
   time_t   time
 
testnet_hard_forks []
 
static const uint64_t testnet_hard_fork_version_1_till = 624633
 
struct {
   uint8_t   version
 
   uint64_t   height
 
   uint8_t   threshold
 
   time_t   time
 
stagenet_hard_forks []
 

Macro Definition Documentation

◆ BLOCK_REWARD_OVERESTIMATE

#define BLOCK_REWARD_OVERESTIMATE   (10 * 1000000000000)

◆ FIND_BLOCKCHAIN_SUPPLEMENT_MAX_SIZE

#define FIND_BLOCKCHAIN_SUPPLEMENT_MAX_SIZE   (100*1024*1024)

◆ MERROR_VER

#define MERROR_VER (   x)    MCERROR("verify", x)

◆ MONERO_DEFAULT_LOG_CATEGORY

#define MONERO_DEFAULT_LOG_CATEGORY   "blockchain"

◆ SCAN_TABLE_QUIT

#define SCAN_TABLE_QUIT (   m)
Value:
do { \
MERROR_VER(m) ;\
m_scan_table.clear(); \
return false; \
} while(0); \

Function Documentation

◆ reserve_container() [1/2]

template<typename T >
void reserve_container ( std::vector< T > &  v,
size_t  N 
)

◆ reserve_container() [2/2]

template<typename T >
void reserve_container ( std::list< T > &  v,
size_t  N 
)

◆ slow_hash_allocate_state()

void slow_hash_allocate_state ( )

◆ slow_hash_free_state()

void slow_hash_free_state ( )

Variable Documentation

◆ height

uint64_t height

◆ mainnet_hard_fork_version_1_till

const uint64_t mainnet_hard_fork_version_1_till = 1009826
static

◆ mainnet_hard_forks

const { ... } mainnet_hard_forks[]
Initial value:
= {
{ 1, 1, 0, 1341378000 },
{ 2, 1009827, 0, 1442763710 },
{ 3, 1141317, 0, 1458558528 },
{ 4, 1220516, 0, 1483574400 },
{ 5, 1288616, 0, 1489520158 },
{ 6, 1400000, 0, 1503046577 },
{ 7, 1546000, 0, 1521303150 },
{ 8, 1685555, 0, 1535889547 },
{ 9, 1686275, 0, 1535889548 },
}

◆ stagenet_hard_forks

const { ... } stagenet_hard_forks[]
Initial value:
= {
{ 1, 1, 0, 1341378000 },
{ 2, 32000, 0, 1521000000 },
{ 3, 33000, 0, 1521120000 },
{ 4, 34000, 0, 1521240000 },
{ 5, 35000, 0, 1521360000 },
{ 6, 36000, 0, 1521480000 },
{ 7, 37000, 0, 1521600000 },
{ 8, 176456, 0, 1537821770 },
{ 9, 177176, 0, 1537821771 },
}

◆ testnet_hard_fork_version_1_till

const uint64_t testnet_hard_fork_version_1_till = 624633
static

◆ testnet_hard_forks

const { ... } testnet_hard_forks[]
Initial value:
= {
{ 1, 1, 0, 1341378000 },
{ 2, 624634, 0, 1445355000 },
{ 3, 800500, 0, 1472415034 },
{ 4, 801219, 0, 1472415035 },
{ 5, 802660, 0, 1472415036 + 86400*180 },
{ 6, 971400, 0, 1501709789 },
{ 7, 1057027, 0, 1512211236 },
{ 8, 1057058, 0, 1515967497 },
{ 9, 1057778, 0, 1515967498 },
}

◆ threshold

uint8_t threshold

◆ time

time_t time

◆ version

uint8_t version