Skip to content

Commit

Permalink
Issue #715 - [regression] resync crashes when block_log doesn't exist…
Browse files Browse the repository at this point in the history
… (but block_log.artifacts are there)
  • Loading branch information
Mariusz-Trela committed Sep 12, 2024
1 parent 834ee56 commit ead7623
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libraries/chain/block_log_artifacts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ void block_log_artifacts::impl::verify_if_blocks_from_block_log_matches_artifact
}
else
{
FC_ASSERT( !use_block_log_head_num || ( use_block_log_head_num && source_block_provider.head() ), "block_log.artifacts and block_log files do not match, since block_log is empty" );
first_block_to_verify = use_block_log_head_num ? source_block_provider.head()->get_block_num() - 1 : _header.head_block_num - 1;
last_block_num_to_verify = std::max<uint32_t>(first_block_to_verify - BLOCKS_SAMPLE_AMOUNT, calculate_tail_block_num(1));
}
Expand Down

0 comments on commit ead7623

Please sign in to comment.