mirror of
https://github.com/monero-project/monero.git
synced 2025-07-31 08:08:41 -04:00
fix wide difficulty conversion with some versions of boost
This commit is contained in:
parent
581994b61c
commit
e980938210
11 changed files with 25 additions and 25 deletions
|
@ -54,8 +54,8 @@ inline bool do_serialize(Archive<true>& ar, cryptonote::difficulty_type &diff)
|
|||
{
|
||||
if (!ar.stream().good())
|
||||
return false;
|
||||
const uint64_t hi = (diff >> 64).convert_to<uint64_t>();
|
||||
const uint64_t lo = (diff << 64 >> 64).convert_to<uint64_t>();
|
||||
const uint64_t hi = ((diff >> 64) & 0xffffffffffffffff).convert_to<uint64_t>();
|
||||
const uint64_t lo = (diff & 0xffffffffffffffff).convert_to<uint64_t>();
|
||||
ar.serialize_varint(hi);
|
||||
ar.serialize_varint(lo);
|
||||
if (!ar.stream().good())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue