From 4d598e3d4d4f0be5fadb3fda73fcdbb7e2bef136 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 6 Feb 2019 19:04:47 +0000 Subject: [PATCH] core: add a few more block rate window sizes The 10 minute one will never trigger for 0 blocks, as it's still fairly likely to happen even without the actual hash rate changing much, so we add a 20 minute window, where it will (for 0 blocks) and a one hour window. --- src/cryptonote_core/cryptonote_core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 62efabf63..f15901175 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -1788,7 +1788,7 @@ namespace cryptonote const time_t now = time(NULL); const std::vector timestamps = m_blockchain_storage.get_last_block_timestamps(60); - static const unsigned int seconds[] = { 5400, 1800, 600 }; + static const unsigned int seconds[] = { 5400, 3600, 1800, 1200, 600 }; for (size_t n = 0; n < sizeof(seconds)/sizeof(seconds[0]); ++n) { unsigned int b = 0;