aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities/bootstrap_serialization.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-01-31 10:44:08 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-24 21:03:19 +0000
commit91f4c7f45f794fc7bee99356e56853369c98c410 (patch)
treeca5eb5edbdeb83511b12b39f0b534a3090fc76b4 /src/blockchain_utilities/bootstrap_serialization.h
parentMerge pull request #5286 (diff)
downloadmonero-91f4c7f45f794fc7bee99356e56853369c98c410.tar.xz
Make difficulty 128 bit instead of 64 bit
Based on Boolberry work by: jahrsg <jahr@jahr.me> cr.zoidberg <crypto.zoidberg@gmail.com>
Diffstat (limited to 'src/blockchain_utilities/bootstrap_serialization.h')
-rw-r--r--src/blockchain_utilities/bootstrap_serialization.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/blockchain_utilities/bootstrap_serialization.h b/src/blockchain_utilities/bootstrap_serialization.h
index 554c6d56e..70b3eea7e 100644
--- a/src/blockchain_utilities/bootstrap_serialization.h
+++ b/src/blockchain_utilities/bootstrap_serialization.h
@@ -29,7 +29,7 @@
#pragma once
#include "cryptonote_basic/cryptonote_boost_serialization.h"
-#include "cryptonote_basic/difficulty.h"
+#include "serialization/difficulty_type.h"
namespace cryptonote
@@ -66,6 +66,23 @@ namespace cryptonote
END_SERIALIZE()
};
+ struct block_package_1
+ {
+ cryptonote::block block;
+ std::vector<transaction> txs;
+ size_t block_weight;
+ uint64_t cumulative_difficulty;
+ uint64_t coins_generated;
+
+ BEGIN_SERIALIZE()
+ FIELD(block)
+ FIELD(txs)
+ VARINT_FIELD(block_weight)
+ VARINT_FIELD(cumulative_difficulty)
+ VARINT_FIELD(coins_generated)
+ END_SERIALIZE()
+ };
+
struct block_package
{
cryptonote::block block;
@@ -78,7 +95,7 @@ namespace cryptonote
FIELD(block)
FIELD(txs)
VARINT_FIELD(block_weight)
- VARINT_FIELD(cumulative_difficulty)
+ FIELD(cumulative_difficulty)
VARINT_FIELD(coins_generated)
END_SERIALIZE()
};