Minor fixies in comments
This commit is contained in:
parent
e399973550
commit
2f44547e0d
|
@ -25,18 +25,21 @@
|
||||||
#define MONEY_SUPPLY
|
#define MONEY_SUPPLY
|
||||||
#define EMISSION_SPEED_FACTOR (18)
|
#define EMISSION_SPEED_FACTOR (18)
|
||||||
|
|
||||||
|
//TODO Define number of blocks for block size median calculation
|
||||||
#define CRYPTONOTE_REWARD_BLOCKS_WINDOW 100
|
#define CRYPTONOTE_REWARD_BLOCKS_WINDOW 100
|
||||||
#define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE 10000 //size of block (bytes) after which reward for block calculated using block size
|
#define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE 10000 //size of block (bytes) after which reward for block calculated using block size
|
||||||
#define CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE 600
|
#define CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE 600
|
||||||
#define CRYPTONOTE_DISPLAY_DECIMAL_POINT 8
|
//TODO Define number of digits
|
||||||
|
#define CRYPTONOTE_DISPLAY_DECIMAL_POINT
|
||||||
//TODO Define number of smallest units in one coin
|
//TODO Define number of smallest units in one coin
|
||||||
#define COIN
|
#define COIN
|
||||||
//TODO Define default fee for transactions
|
//TODO Define default fee for transactions
|
||||||
#define DEFAULT_FEE
|
#define DEFAULT_FEE
|
||||||
|
|
||||||
|
//TODO Define preferred block's target time
|
||||||
|
#define DIFFICULTY_TARGET 120 // seconds
|
||||||
//TODO There are options to tune CryptoNote's difficulty retargeting function.
|
//TODO There are options to tune CryptoNote's difficulty retargeting function.
|
||||||
//TODO We recommend not to change it.
|
//TODO We recommend not to change it.
|
||||||
#define DIFFICULTY_TARGET 120 // seconds
|
|
||||||
#define DIFFICULTY_WINDOW 720 // blocks
|
#define DIFFICULTY_WINDOW 720 // blocks
|
||||||
#define DIFFICULTY_LAG 15
|
#define DIFFICULTY_LAG 15
|
||||||
#define DIFFICULTY_CUT 60 // timestamps to cut after sorting
|
#define DIFFICULTY_CUT 60 // timestamps to cut after sorting
|
||||||
|
|
|
@ -82,6 +82,11 @@ uint64_t blockchain_storage::get_current_blockchain_height() {
|
||||||
|
|
||||||
bool blockchain_storage::init(const std::string& config_folder) {
|
bool blockchain_storage::init(const std::string& config_folder) {
|
||||||
CRITICAL_REGION_LOCAL(m_blockchain_lock);
|
CRITICAL_REGION_LOCAL(m_blockchain_lock);
|
||||||
|
if (!config_folder.empty() && !tools::create_directories_if_necessary(config_folder)) {
|
||||||
|
LOG_ERROR("Failed to create data directory: " << m_config_folder);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
m_config_folder = config_folder;
|
m_config_folder = config_folder;
|
||||||
LOG_PRINT_L0("Loading blockchain...");
|
LOG_PRINT_L0("Loading blockchain...");
|
||||||
if (!m_blocks.open(appendPath(config_folder, CRYPTONOTE_BLOCKS_FILENAME), appendPath(config_folder, CRYPTONOTE_BLOCKINDEXES_FILENAME), 1024)) {
|
if (!m_blocks.open(appendPath(config_folder, CRYPTONOTE_BLOCKS_FILENAME), appendPath(config_folder, CRYPTONOTE_BLOCKINDEXES_FILENAME), 1024)) {
|
||||||
|
|
|
@ -622,7 +622,7 @@ namespace cryptonote
|
||||||
//genesis block
|
//genesis block
|
||||||
bl = boost::value_initialized<block>();
|
bl = boost::value_initialized<block>();
|
||||||
|
|
||||||
//TODO Uncomment this code block on teh first network lounch. It will generate and print you genesis block's hash.
|
//TODO Uncomment this code block on the first network launch. It will generate and print you genesis block's hash.
|
||||||
//TODO Then you must copy it and put to genesis_coinbase_tx_hex variable
|
//TODO Then you must copy it and put to genesis_coinbase_tx_hex variable
|
||||||
/*
|
/*
|
||||||
account_public_address ac = boost::value_initialized<account_public_address>();
|
account_public_address ac = boost::value_initialized<account_public_address>();
|
||||||
|
@ -630,10 +630,10 @@ namespace cryptonote
|
||||||
construct_miner_tx(0, 0, 0, 0, 0, ac, bl.miner_tx); // zero fee in genesis
|
construct_miner_tx(0, 0, 0, 0, 0, ac, bl.miner_tx); // zero fee in genesis
|
||||||
blobdata txb = tx_to_blob(bl.miner_tx);
|
blobdata txb = tx_to_blob(bl.miner_tx);
|
||||||
std::string hex_tx_represent = string_tools::buff_to_hex_nodelimer(txb);
|
std::string hex_tx_represent = string_tools::buff_to_hex_nodelimer(txb);
|
||||||
std::cout << "Genesis block hex: " << hex_to_represent << endl;
|
std::cout << "Genesis coinbase tx hex: " << hex_to_represent << std::endl;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//hard code coinbase tx in genesis block, because "tru" generating tx use random, but genesis should be always the same
|
//hard code coinbase tx in genesis block, because "true" generating tx use random, but genesis should be always the same
|
||||||
//TODO After you obtain hash of the genesis block put it here and recompile sources!
|
//TODO After you obtain hash of the genesis block put it here and recompile sources!
|
||||||
std::string genesis_coinbase_tx_hex = "";
|
std::string genesis_coinbase_tx_hex = "";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue