Skip to content

Commit

Permalink
Merge branch 'graphene/483-history-fix-op-numbers' into release-2015-…
Browse files Browse the repository at this point in the history
…12-16b
  • Loading branch information
theoreticalbts committed Dec 16, 2015
2 parents 802ca9e + d60c8a2 commit e4787e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion libraries/chain/db_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion libraries/plugins/market_history/market_history_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e4787e4

Please sign in to comment.