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

@ -61,7 +61,7 @@ int main(int argc, char *argv[]) {
for (int i = 31; i >= 0; i--) {
val = val * 256 + 255;
((char *) &h)[i] = static_cast<char>(static_cast<uint64_t>(val / diff));
val %= diff.convert_to<uint64_t>();
val %= (diff & 0xffffffffffffffff).convert_to<uint64_t>();
}
if (check_hash(h, diff) != true) {
return 3;