diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-05-07 17:36:27 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-05-07 17:36:27 +0200 |
commit | f64f59627dddd65a6a99cc057586f6460b5154e1 (patch) | |
tree | df76e8e335fc6bb9ac6948b3f571023553dbcea7 /tests/difficulty/difficulty.cpp | |
parent | Merge pull request #5508 (diff) | |
parent | fix wide difficulty conversion with some versions of boost (diff) | |
download | monero-f64f59627dddd65a6a99cc057586f6460b5154e1.tar.xz |
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.cpp | 2 |
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; |