mirror of
https://github.com/monero-project/monero.git
synced 2025-08-12 22:35:29 -04:00
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:
parent
e4b049da05
commit
91f4c7f45f
30 changed files with 787 additions and 62 deletions
|
@ -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()
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue