Skip to content

Commit

Permalink
Fix : Segmentation fault when running several witness nodes on the sa…
Browse files Browse the repository at this point in the history
…me machine
  • Loading branch information
Anton Shkinder authored and anzhy-chernyavski committed Feb 14, 2019
1 parent 2142bc4 commit 0109bc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/chain/db_getter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

} }

2 comments on commit 0109bc8

@bobinson
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

It will be great if this scenario is clarified. Multiple witness nodes are trying to write to the same blockchain (file stored in the disk + memory) ?

@bobinson
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is related to blockchain node from which another node is reading / syncing doesn't have enough blocks. There is an issue listed against bitshares here bitshares/bitshares-core#377

Please sign in to comment.