From 54d041c33a42778a1354e50c644db448a1e945c7 Mon Sep 17 00:00:00 2001 From: clintar Date: Mon, 21 Nov 2016 13:56:56 -0700 Subject: [PATCH] Digitalnote 4.0.0-beta update --- src/cryptonote_config.h | 3 ++- src/cryptonote_core/cryptonote_basic.h | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 31cb0322..3895d327 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -6,7 +6,8 @@ #define CURRENT_BLOCK_MINOR_VERSION 0 #define BLOCK_MAJOR_VERSION_1 1 -#define BLOCK_MAJOR_VERSION_2 3 +#define BLOCK_MAJOR_VERSION_2 2 +#define BLOCK_MAJOR_VERSION_3 3 #define COIN ((uint64_t)100000000) // pow(10, 8) #define DEFAULT_FEE ((uint64_t)1000000) // pow(10, 6) diff --git a/src/cryptonote_core/cryptonote_basic.h b/src/cryptonote_core/cryptonote_basic.h index 20d333dc..814e32e5 100644 --- a/src/cryptonote_core/cryptonote_basic.h +++ b/src/cryptonote_core/cryptonote_basic.h @@ -470,6 +470,15 @@ namespace cryptonote // Implemented below inline serializable_bytecoin_block make_serializable_bytecoin_block(const block& b, bool hashing_serialization, bool header_only); +struct RootBlock { + uint8_t majorVersion; + uint8_t minorVersion; + crypto::hash previousBlockHash; + uint16_t transactionCount; + std::vector baseTransactionBranch; + transaction baseTransaction; + std::vector blockchainBranch; +}; struct block_header { @@ -478,7 +487,6 @@ namespace cryptonote uint64_t timestamp; crypto::hash prev_id; uint32_t nonce; - BEGIN_SERIALIZE() VARINT_FIELD(major_version) VARINT_FIELD(minor_version) @@ -491,7 +499,7 @@ namespace cryptonote struct block: public block_header { bytecoin_block parent_block; - + RootBlock rootBlock; transaction miner_tx; std::vector tx_hashes;