1
0
Fork 0
forked from lthn/blockchain

minor fix for a --stop-after-height option (2)

This commit is contained in:
sowle 2023-04-18 23:31:26 +02:00
parent 740425409b
commit 9f1b68e2b6
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -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)