core: don't check block rate nor fork time in regtest mode

This commit is contained in:
moneromooo-monero 2019-04-07 13:29:21 +00:00
parent 5dbcceb664
commit ffdbcfb6b3
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 4 additions and 1 deletions

View File

@ -1594,6 +1594,9 @@ namespace cryptonote
//-----------------------------------------------------------------------------------------------
bool core::check_fork_time()
{
if (m_nettype == FAKECHAIN)
return true;
HardFork::State state = m_blockchain_storage.get_hard_fork_state();
const el::Level level = el::Level::Warning;
switch (state) {
@ -1809,7 +1812,7 @@ namespace cryptonote
//-----------------------------------------------------------------------------------------------
bool core::check_block_rate()
{
if (m_offline || m_target_blockchain_height > get_current_blockchain_height())
if (m_offline || m_nettype == FAKECHAIN || m_target_blockchain_height > get_current_blockchain_height())
{
MDEBUG("Not checking block rate, offline or syncing");
return true;