Removed all code related to fast_exit

This commit is contained in:
NanoAkron 2016-10-03 02:06:55 +01:00
parent 8f94fcf6a3
commit 6390673137
12 changed files with 2 additions and 104 deletions

View file

@ -433,23 +433,10 @@ namespace cryptonote
{
m_miner.stop();
m_mempool.deinit();
if (!m_fast_exit)
{
m_blockchain_storage.deinit();
}
m_blockchain_storage.deinit();
unlock_db_directory();
return true;
}
//-----------------------------------------------------------------------------------------------
void core::set_fast_exit()
{
m_fast_exit = true;
}
//-----------------------------------------------------------------------------------------------
bool core::get_fast_exit()
{
return m_fast_exit;
}
//-----------------------------------------------------------------------------------------------
void core::test_drop_download()
{
@ -985,6 +972,4 @@ namespace cryptonote
{
raise(SIGTERM);
}
std::atomic<bool> core::m_fast_exit(false);
}

View file

@ -230,28 +230,10 @@ namespace cryptonote
*
* Uninitializes the miner instance, transaction pool, and Blockchain
*
* if m_fast_exit is set, the call to Blockchain::deinit() is not made.
*
* @return true
*/
bool deinit();
/**
* @brief sets fast exit flag
*
* @note see deinit()
*/
static void set_fast_exit();
/**
* @brief gets the current state of the fast exit flag
*
* @return the fast exit flag
*
* @note see deinit()
*/
static bool get_fast_exit();
/**
* @brief sets to drop blocks downloaded (for testing)
*/
@ -764,8 +746,6 @@ namespace cryptonote
*/
bool unlock_db_directory();
static std::atomic<bool> m_fast_exit; //!< whether or not to deinit Blockchain on exit
bool m_test_drop_download = true; //!< whether or not to drop incoming blocks (for testing)
uint64_t m_test_drop_download_height = 0; //!< height under which to drop incoming blocks, if doing so