From ec497e3cb23cdbfaa5005c2a52708720d57ac5bb Mon Sep 17 00:00:00 2001 From: serkixenos Date: Thu, 21 Jan 2021 13:43:39 +0100 Subject: [PATCH] Flush chain database during replay --- libraries/chain/db_management.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libraries/chain/db_management.cpp b/libraries/chain/db_management.cpp index c6380b8c..b0fcda98 100644 --- a/libraries/chain/db_management.cpp +++ b/libraries/chain/db_management.cpp @@ -107,7 +107,6 @@ void database::reindex( fc::path data_dir ) ilog( "reindexing blockchain" ); auto start = fc::time_point::now(); const auto last_block_num = last_block->block_num(); - uint32_t flush_point = last_block_num < 10000 ? 0 : last_block_num - 10000; uint32_t undo_point = last_block_num < 50 ? 0 : last_block_num - 50; ilog( "Replaying blocks, starting at ${next}...", ("next",head_block_num() + 1) ); @@ -123,8 +122,7 @@ void database::reindex( fc::path data_dir ) } for( uint32_t i = head_block_num() + 1; i <= last_block_num; ++i ) { - if( i % 10000 == 0 ) std::cerr << " " << double(i*100)/last_block_num << "% "<().indices().get(); + const auto& lotteries_idx = get_index_type().indices().get(); for( auto checking_asset: lotteries_idx ) { FC_ASSERT( checking_asset.is_lottery() );