oasset_record pending_chain_state::get_asset_record( const std::string& symbol )const { auto itr = symbol_id_index.find( symbol ); if( itr != symbol_id_index.end() ) return get_asset_record( itr->second ); else if( _prev_state ) return _prev_state->get_asset_record( symbol ); return oasset_record(); }
oasset_record pending_chain_state::get_asset_record( asset_id_type asset_id )const { auto itr = assets.find( asset_id ); if( itr != assets.end() ) return itr->second; else if( _prev_state ) return _prev_state->get_asset_record( asset_id ); return oasset_record(); }
oasset_record pending_chain_state::get_asset_record( const std::string& symbol )const { chain_interface_ptr prev_state = _prev_state.lock(); auto itr = symbol_id_index.find( symbol ); if( itr != symbol_id_index.end() ) return get_asset_record( itr->second ); else if( prev_state ) return prev_state->get_asset_record( symbol ); return oasset_record(); }
oasset_record pending_chain_state::get_asset_record( asset_id_type asset_id )const { chain_interface_ptr prev_state = _prev_state.lock(); auto itr = assets.find( asset_id ); if( itr != assets.end() ) return itr->second; else if( prev_state ) return prev_state->get_asset_record( asset_id ); return oasset_record(); }