diff --git a/libraries/chain/db_market.cpp b/libraries/chain/db_market.cpp index f6b9f24c57..3d42f9abc9 100644 --- a/libraries/chain/db_market.cpp +++ b/libraries/chain/db_market.cpp @@ -62,14 +62,14 @@ void database::globally_settle_asset( const asset_object& mia, const price& sett const asset_dynamic_data_object& mia_dyn = mia.dynamic_asset_data_id(*this); auto original_mia_supply = mia_dyn.current_supply; - const auto& call_index = get_index_type().indices().get(); + const auto& call_price_index = get_index_type().indices().get(); auto maint_time = get_dynamic_global_properties().next_maintenance_time; bool before_core_hardfork_342 = ( maint_time <= HARDFORK_CORE_342_TIME ); // better rounding // cancel all call orders and accumulate it into collateral_gathered - auto call_itr = call_index.lower_bound( price::min( bitasset.options.short_backing_asset, mia.id ) ); - auto call_end = call_index.upper_bound( price::max( bitasset.options.short_backing_asset, mia.id ) ); + auto call_itr = call_price_index.lower_bound( price::min( bitasset.options.short_backing_asset, mia.id ) ); + auto call_end = call_price_index.upper_bound( price::max( bitasset.options.short_backing_asset, mia.id ) ); asset pays; while( call_itr != call_end ) { @@ -94,7 +94,7 @@ void database::globally_settle_asset( const asset_object& mia, const price& sett } modify( bitasset, [&mia,original_mia_supply,&collateral_gathered]( asset_bitasset_data_object& obj ){ - obj.settlement_price = mia.amount(original_mia_supply) / collateral_gathered; //settlement_price; + obj.settlement_price = mia.amount(original_mia_supply) / collateral_gathered; obj.settlement_fund = collateral_gathered.amount; });