aboutsummaryrefslogtreecommitdiff
path: root/tests/difficulty
diff options
context:
space:
mode:
Diffstat (limited to 'tests/difficulty')
-rw-r--r--tests/difficulty/CMakeLists.txt2
-rw-r--r--tests/difficulty/difficulty.cpp2
-rwxr-xr-x[-rw-r--r--]tests/difficulty/gen_wide_data.py0
3 files changed, 2 insertions, 2 deletions
diff --git a/tests/difficulty/CMakeLists.txt b/tests/difficulty/CMakeLists.txt
index fb0dd6b9e..c4f5a5dc0 100644
--- a/tests/difficulty/CMakeLists.txt
+++ b/tests/difficulty/CMakeLists.txt
@@ -36,7 +36,7 @@ add_executable(difficulty-tests
${difficulty_headers})
target_link_libraries(difficulty-tests
PRIVATE
- cryptonote_core
+ cryptonote_basic
${EXTRA_LIBRARIES})
set_property(TARGET difficulty-tests
PROPERTY
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;
diff --git a/tests/difficulty/gen_wide_data.py b/tests/difficulty/gen_wide_data.py
index 64af4e208..64af4e208 100644..100755
--- a/tests/difficulty/gen_wide_data.py
+++ b/tests/difficulty/gen_wide_data.py