On first testnet executions hived believes it missed millions of blocks and runs in a loop for a minute or two before starting
When processing database::_apply_block( const signed_block& next_block )
, hived runs update_global_dynamic_data
uint32_t missed_blocks = 0;
if( head_block_time() != fc::time_point_sec() )
{
missed_blocks = get_slot_at_time( b.timestamp );
assert( missed_blocks != 0 );
missed_blocks--;
for( uint32_t i = 0; i < missed_blocks; ++i )
{
const auto& witness_missed = get_witness( get_scheduled_witness( i + 1 ) );
if( witness_missed.owner != b.witness )
{
modify( witness_missed, [&]( witness_object& w )
{
w.total_missed++;
FC_TODO( "#ifndef not needed after HF 20 is live" );
#ifndef IS_TEST_NET
if( has_hardfork( HIVE_HARDFORK_0_14__278 ) && !has_hardfork( HIVE_HARDFORK_0_20__SP190 ) )
{
if( head_block_num() - w.last_confirmed_block_num > HIVE_BLOCKS_PER_DAY )
{
w.signing_key = public_key_type();
push_virtual_operation( shutdown_witness_operation( w.owner ) );
}
}
#endif
} );
}
}
}
missed_blocks = get_slot_at_time( b.timestamp )
basically does current date and compares it to 2016-01-01T00:00:03 which means it will believe the witness initminer missed 62 million blocks, so it will run in a loop and call modify
every time to bump it's missed blocks, which is obviously computationally heavy.