diff options
| author | Riccardo Spagni <ric@spagni.net> | 2019-05-07 17:36:27 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2019-05-07 17:36:27 +0200 |
| commit | f64f59627dddd65a6a99cc057586f6460b5154e1 (patch) | |
| tree | df76e8e335fc6bb9ac6948b3f571023553dbcea7 /src/cryptonote_protocol | |
| parent | 97cb1c9436ec0e9f7f1468703a51596a2b8e3833 (diff) | |
| parent | e9809382109765ce53fcbd95e1fc593d9b19e184 (diff) | |
| download | monzero-core-f64f59627dddd65a6a99cc057586f6460b5154e1.tar.gz monzero-core-f64f59627dddd65a6a99cc057586f6460b5154e1.tar.xz monzero-core-f64f59627dddd65a6a99cc057586f6460b5154e1.zip | |
Merge pull request #5510
e9809382 fix wide difficulty conversion with some versions of boost (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_protocol')
| -rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index 7adca3158..8958af7c7 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -410,8 +410,8 @@ namespace cryptonote m_core.get_blockchain_top(hshd.current_height, hshd.top_id); hshd.top_version = m_core.get_ideal_hard_fork_version(hshd.current_height); difficulty_type wide_cumulative_difficulty = m_core.get_block_cumulative_difficulty(hshd.current_height); - hshd.cumulative_difficulty = (wide_cumulative_difficulty << 64 >> 64).convert_to<uint64_t>(); - hshd.cumulative_difficulty_top64 = (wide_cumulative_difficulty >> 64).convert_to<uint64_t>(); + hshd.cumulative_difficulty = (wide_cumulative_difficulty & 0xffffffffffffffff).convert_to<uint64_t>(); + hshd.cumulative_difficulty_top64 = ((wide_cumulative_difficulty >> 64) & 0xffffffffffffffff).convert_to<uint64_t>(); hshd.current_height +=1; hshd.pruning_seed = m_core.get_blockchain_pruning_seed(); return true; |
