Skip to content

Commit 67166ca

Browse files
committed
Respect skip_fork_db when failed to push a block
1 parent 549337e commit 67166ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libraries/chain/db_block.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ bool database::_push_block(const signed_block& new_block)
209209
session.commit();
210210
} catch ( const fc::exception& e ) {
211211
elog("Failed to push new block:\n${e}", ("e", e.to_detail_string()));
212-
_fork_db.remove(new_block.id());
212+
if( !(skip&skip_fork_db) )
213+
{
214+
_fork_db.remove( new_block.id() );
215+
}
213216
throw;
214217
}
215218

0 commit comments

Comments
 (0)