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.
This commit is contained in:
moneromooo-monero 2019-02-06 19:04:47 +00:00 committed by wowario
parent eb5a2cbdd2
commit eb982caad1
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111
1 changed files with 1 additions and 1 deletions

View File

@ -1754,7 +1754,7 @@ namespace cryptonote
const time_t now = time(NULL);
const std::vector<time_t> 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;