aboutsummaryrefslogtreecommitdiff
path: root/tests/difficulty
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-05-01 19:57:34 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-05-01 19:58:09 +0000
commite9809382109765ce53fcbd95e1fc593d9b19e184 (patch)
treef79bcb4fd4f14e9b262f67c70b4181f6df86b5eb /tests/difficulty
parentMerge pull request #5486 (diff)
downloadmonero-e9809382109765ce53fcbd95e1fc593d9b19e184.tar.xz
fix wide difficulty conversion with some versions of boost
Diffstat (limited to 'tests/difficulty')
-rw-r--r--tests/difficulty/difficulty.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/difficulty/difficulty.cpp b/tests/difficulty/difficulty.cpp
index 11ce0bd73..18f1d0030 100644
--- a/tests/difficulty/difficulty.cpp
+++ b/tests/difficulty/difficulty.cpp
@@ -124,7 +124,7 @@ int main(int argc, char *argv[]) {
cryptonote::difficulty_type wide_res = cryptonote::next_difficulty(
std::vector<uint64_t>(timestamps.begin() + begin, timestamps.begin() + end),
std::vector<cryptonote::difficulty_type>(wide_cumulative_difficulties.begin() + begin, wide_cumulative_difficulties.begin() + end), DEFAULT_TEST_DIFFICULTY_TARGET);
- if (wide_res.convert_to<uint64_t>() != res) {
+ if ((wide_res & 0xffffffffffffffff).convert_to<uint64_t>() != res) {
cerr << "Wrong wide difficulty for block " << n << endl
<< "Expected: " << res << endl
<< "Found: " << wide_res << endl;