Skip to content

Commit

Permalink
Enable tx dupe check a little earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
pmconrad committed Oct 6, 2018
1 parent 4e6d2d4 commit e9f273d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libraries/chain/db_management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ void database::reindex( fc::path data_dir )
size_t total_processed_block_size;
size_t total_block_size = _block_id_to_block.total_block_size();
const auto& gpo = get_global_properties();
const fc::time_point_sec now( fc::time_point::now() );
for( uint32_t i = head_block_num() + 1; i <= last_block_num; ++i )
{
if( i % 10000 == 0 )
Expand All @@ -109,7 +108,7 @@ void database::reindex( fc::path data_dir )
flush();
ilog( "Done" );
}
if( head_block_time() >= now - gpo.parameters.maximum_time_until_expiration )
if( head_block_time() >= last_block->timestamp - gpo.parameters.maximum_time_until_expiration )
skip &= ~skip_transaction_dupe_check;
fc::optional< signed_block > block = _block_id_to_block.fetch_by_number(i);
if( !block.valid() )
Expand Down

0 comments on commit e9f273d

Please sign in to comment.