Merge branch '483-history-fix-op-numbers' into develop
This commit is contained in:
commit
0ccc6722eb
2 changed files with 10 additions and 2 deletions
|
|
@ -442,7 +442,12 @@ uint32_t database::push_applied_operation( const operation& op )
|
|||
void database::set_applied_operation_result( uint32_t op_id, const operation_result& result )
|
||||
{
|
||||
assert( op_id < _applied_ops.size() );
|
||||
_applied_ops[op_id]->result = result;
|
||||
if( _applied_ops[op_id] )
|
||||
_applied_ops[op_id]->result = result;
|
||||
else
|
||||
{
|
||||
elog( "Could not set operation result (head_block_num=${b})", ("b", head_block_num()) );
|
||||
}
|
||||
}
|
||||
|
||||
const vector<optional< operation_history_object > >& database::get_applied_operations() const
|
||||
|
|
|
|||
|
|
@ -218,7 +218,10 @@ void market_history_plugin_impl::update_market_histories( const signed_block& b
|
|||
graphene::chain::database& db = database();
|
||||
const vector<optional< operation_history_object > >& hist = db.get_applied_operations();
|
||||
for( const optional< operation_history_object >& o_op : hist )
|
||||
o_op->op.visit( operation_process_fill_order( _self, b.timestamp ) );
|
||||
{
|
||||
if( o_op.valid() )
|
||||
o_op->op.visit( operation_process_fill_order( _self, b.timestamp ) );
|
||||
}
|
||||
}
|
||||
|
||||
} // end namespace detail
|
||||
|
|
|
|||
Loading…
Reference in a new issue