This commit is contained in:
Daniel Larimer 2015-06-25 14:33:46 -04:00
parent fdf8d98953
commit 543959fa64
2 changed files with 6 additions and 2 deletions

View file

@ -308,7 +308,7 @@ void_result asset_update_feed_producers_evaluator::do_apply(const asset_update_f
a.feeds[*itr]; a.feeds[*itr];
a.update_median_feeds(db().head_block_time()); a.update_median_feeds(db().head_block_time());
}); });
db().check_call_orders( o.asset_to_update(db()) );
return void_result(); return void_result();
} FC_CAPTURE_AND_RETHROW( (o) ) } } FC_CAPTURE_AND_RETHROW( (o) ) }
@ -425,7 +425,7 @@ void_result asset_publish_feeds_evaluator::do_apply(const asset_publish_feed_ope
a.update_median_feeds(d.head_block_time()); a.update_median_feeds(d.head_block_time());
}); });
/// TODO: only do this if the median feed actually changed, otherwise there is no point /// TODO: optimization: only do this if the median feed actually changed, otherwise there is no point
db().check_call_orders( base ); db().check_call_orders( base );
return void_result(); return void_result();

View file

@ -222,9 +222,13 @@ void database::update_expired_feeds()
auto& asset_idx = get_index_type<asset_bitasset_data_index>(); auto& asset_idx = get_index_type<asset_bitasset_data_index>();
for( const asset_bitasset_data_object* b : asset_idx ) for( const asset_bitasset_data_object* b : asset_idx )
if( b->feed_is_expired(head_block_time()) ) if( b->feed_is_expired(head_block_time()) )
{
modify(*b, [this](asset_bitasset_data_object& a) { modify(*b, [this](asset_bitasset_data_object& a) {
a.update_median_feeds(head_block_time()); a.update_median_feeds(head_block_time());
}); });
check_call_orders( b->current_feed.settlement_price.base.asset_id(*this) );
}
} }
void database::update_withdraw_permissions() void database::update_withdraw_permissions()