File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,14 @@ node_property_object& database::node_properties()
99
99
100
100
uint32_t database::last_non_undoable_block_num () const
101
101
{
102
- return head_block_num () - ( _undo_db.size () - _undo_db.active_sessions ());
102
+ // see https://github.com/bitshares/bitshares-core/issues/377
103
+ /*
104
+ There is a case when a value of undo_db.size() is greater then head_block_num(),
105
+ and as result we get a wrong value for last_non_undoable_block_num.
106
+ To resolve it we should take into account a number of active_sessions in calculations of
107
+ last_non_undoable_block_num (active sessions are related to a new block which is under generation).
108
+ */
109
+ return head_block_num () - ( _undo_db.size () - _undo_db.active_sessions () );
103
110
}
104
111
105
112
const account_statistics_object& database::get_account_stats_by_owner ( account_id_type owner )const
You can’t perform that action at this time.
0 commit comments