Commit e3c3a534 authored by Marcin Sobczyk's avatar Marcin Sobczyk
Browse files

dont decrease lib before HIVE_START_MINER_VOTING_BLOCK

parent 357ecf30
......@@ -4982,8 +4982,12 @@ uint32_t database::update_last_irreversible_block()
*/
if( head_block_num() < HIVE_START_MINER_VOTING_BLOCK )
{
if ( head_block_num() > HIVE_MAX_WITNESSES )
set_last_irreversible_block_num(head_block_num() - HIVE_MAX_WITNESSES);
if ( head_block_num() > HIVE_MAX_WITNESSES ) {
uint32_t new_last_irreversible_block_num = head_block_num() - HIVE_MAX_WITNESSES;
if( new_last_irreversible_block_num > get_last_irreversible_block_num() )
set_last_irreversible_block_num(new_last_irreversible_block_num);
}
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment