From e9809382109765ce53fcbd95e1fc593d9b19e184 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 1 May 2019 19:57:34 +0000 Subject: fix wide difficulty conversion with some versions of boost --- tests/difficulty/difficulty.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/difficulty') 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(timestamps.begin() + begin, timestamps.begin() + end), std::vector(wide_cumulative_difficulties.begin() + begin, wide_cumulative_difficulties.begin() + end), DEFAULT_TEST_DIFFICULTY_TARGET); - if (wide_res.convert_to() != res) { + if ((wide_res & 0xffffffffffffffff).convert_to() != res) { cerr << "Wrong wide difficulty for block " << n << endl << "Expected: " << res << endl << "Found: " << wide_res << endl; -- cgit v1.2.3