diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-11-04 20:41:18 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-11-04 20:41:19 +0200 |
commit | dc7de3312f0c38126d6aa01caa0a0c283804046e (patch) | |
tree | 6042394208ba727e0e387f331e84f37466eff3a6 | |
parent | Merge pull request #4676 (diff) | |
parent | cryptonote_core: fix build error gcc 5.4.0 'sign-compare' (diff) | |
download | monero-dc7de3312f0c38126d6aa01caa0a0c283804046e.tar.xz |
Merge pull request #4779
233f00c6 cryptonote_core: fix build error gcc 5.4.0 'sign-compare' (xiphon)
-rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 2 |
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) |