From 9aa886bedaad4f17d6d2abef4a6d582a6a20119e Mon Sep 17 00:00:00 2001 From: wowario <38101080+wowario@users.noreply.github.com> Date: Mon, 23 Apr 2018 17:50:53 +0300 Subject: [PATCH] Update difficulty.cpp Changed size_t to match solvetime --- src/cryptonote_basic/difficulty.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryptonote_basic/difficulty.cpp b/src/cryptonote_basic/difficulty.cpp index 4df313b26..09798d787 100644 --- a/src/cryptonote_basic/difficulty.cpp +++ b/src/cryptonote_basic/difficulty.cpp @@ -219,7 +219,7 @@ namespace cryptonote { uint64_t difficulty(0), next_difficulty(0); // Loop through N most recent blocks. N is most recently solved block. - for (size_t i = 1; i <= N; i++) { + for (int64_t i = 1; i <= N; i++) { solveTime = static_cast(timestamps[i]) - static_cast(timestamps[i - 1]); solveTime = std::min((T * 7), std::max(solveTime, (-7 * T))); difficulty = cumulative_difficulties[i] - cumulative_difficulties[i - 1];