<commit_before>/** This file is designed to be included in detail::chain_database_impl, but is pulled into a separate file for
 * ease of maintenance and upgrade.
 */

class market_engine_v4
{
   public:
      market_engine_v4( pending_chain_state_ptr ps, chain_database_impl& cdi )
      :_pending_state(ps),_db_impl(cdi)
      {
         _pending_state = std::make_shared<pending_chain_state>( ps );
         _prior_state = ps;
      }

      void cancel_all_shorts( const time_point_sec& limit_timestamp )
      {
         for( auto short_itr = _db_impl._short_db.begin(); short_itr.valid(); ++short_itr )
         {
             const market_index_key market_idx = short_itr.key();
             const order_record order_rec = short_itr.value();

             if( order_rec.last_update >= limit_timestamp )
                 continue;

             _current_bid = market_order( short_order, market_idx, order_rec );

             // Initialize the market transaction
             market_transaction mtrx;
             mtrx.bid_owner = _current_bid->get_owner();
             mtrx.bid_type = short_order;

             cancel_current_short( mtrx, market_idx.order_price.quote_asset_id );
             push_market_transaction( mtrx );
         }
      }

      void execute( asset_id_type quote_id, asset_id_type base_id, const fc::time_point_sec& timestamp )
      {
         try
         {
             const uint32_t pending_block_num = _pending_state->get_head_block_num();

             _quote_id = quote_id;<commit_msg>Add missing line to old market engine version<commit_after>/** This file is designed to be included in detail::chain_database_impl, but is pulled into a separate file for
 * ease of maintenance and upgrade.
 */

class market_engine_v4
{
   public:
      market_engine_v4( pending_chain_state_ptr ps, chain_database_impl& cdi )
      :_pending_state(ps),_db_impl(cdi)
      {
         _pending_state = std::make_shared<pending_chain_state>( ps );
         _prior_state = ps;
      }

      void cancel_all_shorts( const time_point_sec& limit_timestamp )
      {
         for( auto short_itr = _db_impl._short_db.begin(); short_itr.valid(); ++short_itr )
         {
             const market_index_key market_idx = short_itr.key();
             const order_record order_rec = short_itr.value();

             if( order_rec.last_update >= limit_timestamp )
                 continue;

             _current_bid = market_order( short_order, market_idx, order_rec );

             // Initialize the market transaction
             market_transaction mtrx;
             mtrx.bid_owner = _current_bid->get_owner();
             mtrx.bid_type = short_order;

             cancel_current_short( mtrx, market_idx.order_price.quote_asset_id );
             push_market_transaction( mtrx );
         }
         
         _pending_state->apply_changes();
      }

      void execute( asset_id_type quote_id, asset_id_type base_id, const fc::time_point_sec& timestamp )
      {
         try
         {
             const uint32_t pending_block_num = _pending_state->get_head_block_num();

             _quote_id = quote_id;
{'fraction_non_alphanumeric': 0.07753669432035737, 'fraction_numerical': 0.0025526483726866626, 'mean_word_length': 2.3965330444203685, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2966591', 'n_tokens_mistral': 935, 'n_tokens_neox': 923, 'n_words': 199}