aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2018-10-26 23:07:23 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-01 22:57:08 +0000
commit233f00c60171174164fb5170c1a9458748846f54 (patch)
tree1685b58425e561a41f107f3ed42bd229d6d7cc42 /src
parentMerge pull request #4721 (diff)
downloadmonero-233f00c60171174164fb5170c1a9458748846f54.tar.xz
cryptonote_core: fix build error gcc 5.4.0 'sign-compare'
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index d8c38bf9e..4b806c282 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -1716,7 +1716,7 @@ namespace cryptonote
for (size_t n = 0; n < sizeof(seconds)/sizeof(seconds[0]); ++n)
{
unsigned int b = 0;
- for (time_t ts: timestamps) b += ts >= now - seconds[n];
+ for (time_t ts: timestamps) b += ts >= now - static_cast<time_t>(seconds[n]);
const double p = probability(b, seconds[n] / DIFFICULTY_TARGET_V2);
MDEBUG("blocks in the last " << seconds[n] / 60 << " minutes: " << b << " (probability " << p << ")");
if (p < threshold)