aboutsummaryrefslogtreecommitdiff
path: root/tests/difficulty/difficulty.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/difficulty/difficulty.cpp
parent97cb1c9436ec0e9f7f1468703a51596a2b8e3833 (diff)
parente9809382109765ce53fcbd95e1fc593d9b19e184 (diff)
downloadmonzero-core-f64f59627dddd65a6a99cc057586f6460b5154e1.tar.gz
monzero-core-f64f59627dddd65a6a99cc057586f6460b5154e1.tar.xz
monzero-core-f64f59627dddd65a6a99cc057586f6460b5154e1.zip
Merge pull request #5510
e9809382 fix wide difficulty conversion with some versions of boost (moneromooo-monero)
Diffstat (limited to 'tests/difficulty/difficulty.cpp')
-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;