mirror of
https://github.com/monero-project/monero.git
synced 2025-05-02 12:56:08 -04:00
fix wide difficulty conversion with some versions of boost
This commit is contained in:
parent
581994b61c
commit
e980938210
11 changed files with 25 additions and 25 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue