Skip to content
This repository was archived by the owner on Feb 21, 2019. It is now read-only.

Commit a60ea16

Browse files
market_engine: Remove obsolete _short_itr
1 parent d08f0d5 commit a60ea16

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

libraries/blockchain/include/bts/blockchain/market_engine.hpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,10 @@ namespace bts { namespace blockchain { namespace detail {
8787
private:
8888
bts::db::cached_level_map< market_index_key, order_record >::iterator _bid_itr;
8989
bts::db::cached_level_map< market_index_key, order_record >::iterator _ask_itr;
90-
bts::db::cached_level_map< market_index_key, order_record >::iterator _short_itr;
9190
std::set< market_index_key >::reverse_iterator _short_at_feed_itr;
9291
std::set< pair<price,market_index_key> >::reverse_iterator _short_at_limit_itr;
9392
bts::db::cached_level_map< market_index_key, collateral_record >::iterator _collateral_itr;
94-
std::set< expiration_index >::iterator _collateral_expiration_itr;
93+
std::set< expiration_index >::iterator _collateral_expiration_itr;
9594
};
9695

9796
} } } // end namespace bts::blockchain::detail

libraries/blockchain/market_engine.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ namespace bts { namespace blockchain { namespace detail {
3737
const price next_pair = (base_id+1 == quote_id) ? price( 0, quote_id+1, 0 ) : price( 0, quote_id, base_id+1 );
3838
_bid_itr = _db_impl._bid_db.lower_bound( market_index_key( next_pair ) );
3939
_ask_itr = _db_impl._ask_db.lower_bound( market_index_key( price( 0, quote_id, base_id) ) );
40-
_short_itr = _db_impl._short_db.lower_bound( market_index_key_ext( next_pair ) );
4140
_short_at_feed_itr = std::set<market_index_key>::reverse_iterator(_db_impl._shorts_at_feed.lower_bound( market_index_key_ext( next_pair ) ));
4241
_short_at_limit_itr = _db_impl._short_limit_index.rend();
4342
_collateral_itr = _db_impl._collateral_db.lower_bound( market_index_key( next_pair ) );
@@ -60,9 +59,6 @@ namespace bts { namespace blockchain { namespace detail {
6059
if( _collateral_itr.valid() ) --_collateral_itr;
6160
else _collateral_itr = _db_impl._collateral_db.last();
6261

63-
if( _short_itr.valid() ) --_short_itr;
64-
else _short_itr = _db_impl._short_db.last();
65-
6662
// Market issued assets cannot match until the first time there is a median feed; assume feed price base id 0
6763
if( quote_asset->is_market_issued() && base_asset->id == 0 )
6864
{

0 commit comments

Comments
 (0)