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_core | |
parent | Merge pull request #5508 (diff) | |
parent | fix wide difficulty conversion with some versions of boost (diff) | |
download | monero-f64f59627dddd65a6a99cc057586f6460b5154e1.tar.xz |
Merge pull request #5510
e9809382 fix wide difficulty conversion with some versions of boost (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 32e94ad09..39c9f8695 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -2325,8 +2325,8 @@ bool Blockchain::find_blockchain_supplement(const std::list<crypto::hash>& qbloc if (result) { cryptonote::difficulty_type wide_cumulative_difficulty = m_db->get_block_cumulative_difficulty(resp.total_height - 1); - resp.cumulative_difficulty = (wide_cumulative_difficulty << 64 >> 64).convert_to<uint64_t>(); - resp.cumulative_difficulty_top64 = (wide_cumulative_difficulty >> 64).convert_to<uint64_t>(); + resp.cumulative_difficulty = (wide_cumulative_difficulty & 0xffffffffffffffff).convert_to<uint64_t>(); + resp.cumulative_difficulty_top64 = ((wide_cumulative_difficulty >> 64) & 0xffffffffffffffff).convert_to<uint64_t>(); } return result; |