forked from lthn/blockchain
minor fix for a --stop-after-height option (2)
This commit is contained in:
parent
740425409b
commit
9f1b68e2b6
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue