Make difficulty 128 bit instead of 64 bit

Based on Boolberry work by:
  jahrsg <jahr@jahr.me>
  cr.zoidberg <crypto.zoidberg@gmail.com>
This commit is contained in:
moneromooo-monero 2019-01-31 10:44:08 +00:00
parent e4b049da05
commit 91f4c7f45f
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
30 changed files with 787 additions and 62 deletions

View file

@ -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()
};