Fix : Segmentation fault when running several witness nodes on the same machine

This commit is contained in:
Anton Shkinder 2019-02-14 16:09:33 +03:00 committed by Anzhy Cherrnyavski
parent 2142bc4d08
commit 0109bc8c04

View file

@ -94,7 +94,7 @@ node_property_object& database::node_properties()
uint32_t database::last_non_undoable_block_num() const
{
return head_block_num() - _undo_db.size();
return head_block_num() < _undo_db.size() ? 0 : head_block_num() - _undo_db.size();
}
} }