Issue #29 - get_short_orders crashes for UIA

This commit is contained in:
Daniel Larimer 2015-06-09 16:17:26 -04:00
parent 294c852c50
commit d1f3ce8543

View file

@ -209,6 +209,8 @@ namespace graphene { namespace app {
const auto& sell_price_idx = short_order_idx.indices().get<by_price>();
const asset_object& mia = _db.get(a);
FC_ASSERT( mia.is_market_issued(), "must be a market issued asset" );
price index_price = price::min(mia.get_id(), mia.bitasset_data(_db).options.short_backing_asset);
auto short_itr = sell_price_idx.lower_bound(index_price.max());