Skip to content

Commit

Permalink
difficulty::to_multiplier REMOVE ASSERT
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Feb 13, 2024
1 parent 0a374d5 commit a3a76c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nano/lib/numbers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,11 @@ uint64_t nano::difficulty::from_multiplier (double const multiplier_a, uint64_t

double nano::difficulty::to_multiplier (uint64_t const difficulty_a, uint64_t const base_difficulty_a)
{
debug_assert (difficulty_a > 0);
if (difficulty_a == 0)
{
return 1.0;
}

return static_cast<double> (-base_difficulty_a) / (-difficulty_a);
}

Expand Down

0 comments on commit a3a76c9

Please sign in to comment.