removing unnecessary assert

This commit is contained in:
Daniel Larimer 2015-10-07 11:09:28 -04:00
parent 8e96d9c89c
commit fe552a42d0
2 changed files with 2 additions and 1 deletions

View file

@ -141,6 +141,7 @@ bool database::_push_block(const signed_block& new_block)
// push all blocks on the new fork
for( auto ritr = branches.first.rbegin(); ritr != branches.first.rend(); ++ritr )
{
ilog( "pushing blocks from fork ${n} ${id}", ("n",(*ritr)->data.block_num())("id",(*ritr)->data.id()) );
optional<fc::exception> except;
try {
undo_database::session session = _undo_db.start_undo_session();
@ -151,6 +152,7 @@ bool database::_push_block(const signed_block& new_block)
catch ( const fc::exception& e ) { except = e; }
if( except )
{
wlog( "exception thrown while switching forks ${e}", ("e",except->to_detail_string() ) );
// remove the rest of branches.first from the fork_db, those blocks are invalid
while( ritr != branches.first.rend() )
{

View file

@ -69,7 +69,6 @@ void fork_database::_push_block(const item_ptr& item)
FC_ASSERT( item->num > std::max<int64_t>( 0, int64_t(_head->num) - (_max_size) ),
"attempting to push a block that is too old",
("item->num",item->num)("head",_head->num)("max_size",_max_size));
FC_ASSERT( item->num <= _head->num + 1, "", ("item->num",item->num)("head+1",_head->num+1) );//MAX_BLOCK_REORDERING );
}
if( _head && item->previous_id() != block_id_type() )