src/cryptonote_core/tx_pool.cpp
//---------------------------------------------------------------------------------
//TODO: investigate whether only ever returning true is correct
investigate whether only ever returning true is correct
investigate whether only ever returning true is correct
bool tx_memory_pool::deinit()
  {
    if (m_config_folder.empty())
      return true;
    if (!tools::create_directories_if_necessary(m_config_folder))
    {
      LOG_PRINT_L1("Failed to create data directory: " << m_config_folder);
      return false;
    }
    std::string state_file_path = m_config_folder + "/" + CRYPTONOTE_POOLDATA_FILENAME;
    bool res = tools::serialize_obj_to_file(*this, state_file_path);
    if(!res)
    {
      LOG_PRINT_L1("Failed to serialize memory pool to file " << state_file_path);
    }
    return true;
  }
bool tx_memory_pool :: deinit ( ) { if ( m_config_folder . empty ( ) ) return true ; if ( ! tools :: create_directories_if_necessary ( m_config_folder ) ) { LOG_PRINT_L1 ( " " << m_config_folder ) ; return false ; } std :: string state_file_path = m_config_folder + " " + CRYPTONOTE_POOLDATA_FILENAME ; bool res = tools :: serialize_obj_to_file ( * this , state_file_path ) ; if ( ! res ) { LOG_PRINT_L1 ( " " << state_file_path ) ; } return true ; }
TODO: investigate whether only ever returning true is correct
TODO : investigate whether only ever returning true is correct