Skip to content

Commit

Permalink
Fixed three compiler warnings (C26498) (#4617)
Browse files Browse the repository at this point in the history
  • Loading branch information
RickiNano authored May 13, 2024
1 parent 6eeaf21 commit e4901db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nano/core_test/difficulty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TEST (difficultyDeathTest, multipliers)
}

{
uint64_t base = std::numeric_limits<std::uint64_t>::max ();
constexpr uint64_t base = std::numeric_limits<std::uint64_t>::max ();
uint64_t difficulty = 0xffffffffffffff00;
double expected_multiplier = 0.00390625;

Expand Down Expand Up @@ -68,8 +68,8 @@ TEST (difficulty, overflow)
{
// Overflow max (attempt to overflow & receive lower difficulty)
{
uint64_t base = std::numeric_limits<std::uint64_t>::max (); // Max possible difficulty
uint64_t difficulty = std::numeric_limits<std::uint64_t>::max ();
constexpr uint64_t base = std::numeric_limits<std::uint64_t>::max (); // Max possible difficulty
constexpr uint64_t difficulty = std::numeric_limits<std::uint64_t>::max ();
double multiplier = 1.001; // Try to increase difficulty above max

ASSERT_EQ (difficulty, nano::difficulty::from_multiplier (multiplier, base));
Expand Down

0 comments on commit e4901db

Please sign in to comment.