1
0
Fork 0
forked from lthn/blockchain

fixed an issue with genesis block major version

This commit is contained in:
sowle 2019-08-13 20:01:08 +03:00
parent 3bdb154d05
commit 91c85ae2a7
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
2 changed files with 7 additions and 5 deletions

View file

@ -211,11 +211,13 @@
#define CURRENT_MEMPOOL_ARCHIVE_VER (CURRENCY_FORMATION_VERSION+31)
//hard forks section
#define BLOCK_MAJOR_VERSION_INITAL 0
#define BLOCK_MAJOR_VERSION_GENESIS 1
#define BLOCK_MINOR_VERSION_GENESIS 0
#define BLOCK_MAJOR_VERSION_INITAL 0
#ifndef TESTNET
#define ZANO_HARDFORK_1_AFTER_HEIGHT 166440
#define ZANO_HARDFORK_1_AFTER_HEIGHT 166440
#else
#define ZANO_HARDFORK_1_AFTER_HEIGHT 62102
#define ZANO_HARDFORK_1_AFTER_HEIGHT 62102
#endif

View file

@ -1906,8 +1906,8 @@ namespace currency
//string_tools::parse_hexstr_to_binbuff(genesis_coinbase_tx_hex, tx_bl);
bool r = parse_and_validate_tx_from_blob(tx_bl, bl.miner_tx);
CHECK_AND_ASSERT_MES(r, false, "failed to parse coinbase tx from hard coded blob");
bl.major_version = BLOCK_MAJOR_VERSION_INITAL;
bl.minor_version = CURRENT_BLOCK_MINOR_VERSION;
bl.major_version = BLOCK_MAJOR_VERSION_GENESIS;
bl.minor_version = BLOCK_MINOR_VERSION_GENESIS;
bl.timestamp = 0;
bl.nonce = CURRENCY_GENESIS_NONCE;
LOG_PRINT_GREEN("Generated genesis: " << get_block_hash(bl), LOG_LEVEL_0);