diff --git a/src/currency_core/currency_core.cpp b/src/currency_core/currency_core.cpp index fded84a5..fde150f9 100644 --- a/src/currency_core/currency_core.cpp +++ b/src/currency_core/currency_core.cpp @@ -500,7 +500,7 @@ namespace currency bool core::add_new_block(const block& b, block_verification_context& bvc) { uint64_t h = m_blockchain_storage.get_top_block_height(); - if (h >= m_stop_after_height) + if (m_stop_after_height != 0 && h >= m_stop_after_height) { LOG_PRINT_YELLOW("Blockchain top block height is " << h << ", the daemon will now stop as requested", LOG_LEVEL_0); if (m_critical_error_handler)