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
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
11 changed files with 25 additions and 25 deletions

View file

@ -365,11 +365,11 @@ namespace boost
else
{
// store high part
cryptonote::difficulty_type x_ = x >> 64;
cryptonote::difficulty_type x_ = (x >> 64) & 0xffffffffffffffff;
uint64_t v = x_.convert_to<uint64_t>();
a & v;
// store low part
x_ = x << 64 >> 64;
x_ = x & 0xffffffffffffffff;
v = x_.convert_to<uint64_t>();
a & v;
}