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

@@ -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;
}