From 9f1b68e2b6b696c8f4755bd09c3e37431aa1f24b Mon Sep 17 00:00:00 2001 From: sowle Date: Tue, 18 Apr 2023 23:31:26 +0200 Subject: [PATCH] minor fix for a --stop-after-height option (2) --- src/currency_core/currency_core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)