fix wide difficulty conversion with some versions of boost

This commit is contained in:
moneromooo-monero
2019-05-01 19:57:34 +00:00
parent 581994b61c
commit e980938210
11 changed files with 25 additions and 25 deletions

View File

@@ -2324,8 +2324,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;