adding extra checks on startup
This commit is contained in:
parent
a84e56c2aa
commit
866c453f1a
2 changed files with 6 additions and 1 deletions
|
|
@ -82,6 +82,7 @@ void database::wipe(const fc::path& data_dir, bool include_blocks)
|
|||
void database::open(
|
||||
const fc::path& data_dir,
|
||||
std::function<genesis_state_type()> genesis_loader )
|
||||
elog( "Open Database" );
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -98,6 +99,9 @@ void database::open(
|
|||
auto last_block = _block_id_to_block.last();
|
||||
if( last_block.valid() )
|
||||
_fork_db.start_block( *last_block );
|
||||
|
||||
idump((last_block->id())(last_block->block_num())(head_block_id())(head_block_num()));
|
||||
FC_ASSERT( last_block->id() == head_block_id() );
|
||||
}
|
||||
FC_CAPTURE_AND_RETHROW( (data_dir) )
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ shared_ptr<fork_item> fork_database::push_block(const signed_block& b)
|
|||
}
|
||||
catch ( const unlinkable_block_exception& e )
|
||||
{
|
||||
wlog( "Pushing block to fork database that failed to link." );
|
||||
wlog( "Pushing block to fork database that failed to link: ${id}, ${num}", ("id",b.id())("num",b.block_num()) );
|
||||
wlog( "Head: ${num}, ${id}", ("num",_head->data.block_num())("id",_head->data.id()) );
|
||||
_unlinked_index.insert( item );
|
||||
}
|
||||
return _head;
|
||||
|
|
|
|||
Loading…
Reference in a new issue