fix wide difficulty conversion with some versions of boost

This commit is contained in:
moneromooo-monero 2019-05-01 19:57:34 +00:00
parent 581994b61c
commit e980938210
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
11 changed files with 25 additions and 25 deletions

View file

@ -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;