aboutsummaryrefslogtreecommitdiff
path: root/tests/hash-target.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-05-07 17:36:27 +0200
committerRiccardo Spagni <ric@spagni.net>2019-05-07 17:36:27 +0200
commitf64f59627dddd65a6a99cc057586f6460b5154e1 (patch)
treedf76e8e335fc6bb9ac6948b3f571023553dbcea7 /tests/hash-target.cpp
parentMerge pull request #5508 (diff)
parentfix wide difficulty conversion with some versions of boost (diff)
downloadmonero-f64f59627dddd65a6a99cc057586f6460b5154e1.tar.xz
Merge pull request #5510
e9809382 fix wide difficulty conversion with some versions of boost (moneromooo-monero)
Diffstat (limited to 'tests/hash-target.cpp')
-rw-r--r--tests/hash-target.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/hash-target.cpp b/tests/hash-target.cpp
index 1e988c302..e95475cac 100644
--- a/tests/hash-target.cpp
+++ b/tests/hash-target.cpp
@@ -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;