diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-12-31 17:58:06 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-12-31 17:58:06 +0200 |
commit | c991865ffc2d8e10106b3c14a32dca43c658dcc2 (patch) | |
tree | 5445ef6b2688efc45711fd3191a116f32c27f8c4 /src | |
parent | Merge pull request #585 (diff) | |
parent | core: do not use the persistent pool state for tests (diff) | |
download | monero-c991865ffc2d8e10106b3c14a32dca43c658dcc2.tar.xz |
Merge pull request #586
40f97ce core: do not use the persistent pool state for tests (moneromooo-monero)
Diffstat (limited to '')
-rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 2 | ||||
-rw-r--r-- | src/cryptonote_core/tx_pool.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 2fa339c31..2934659f1 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -222,7 +222,7 @@ namespace cryptonote { bool r = handle_command_line(vm); - r = m_mempool.init(m_config_folder); + r = m_mempool.init(m_fakechain ? std::string() : m_config_folder); CHECK_AND_ASSERT_MES(r, false, "Failed to initialize memory pool"); #if BLOCKCHAIN_DB == DB_LMDB diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index bdd86d3e0..1be44172d 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -612,6 +612,9 @@ namespace cryptonote CRITICAL_REGION_LOCAL(m_transactions_lock); m_config_folder = config_folder; + if (m_config_folder.empty()) + return true; + std::string state_file_path = config_folder + "/" + CRYPTONOTE_POOLDATA_FILENAME; boost::system::error_code ec; if(!boost::filesystem::exists(state_file_path, ec)) @@ -648,6 +651,9 @@ namespace cryptonote //--------------------------------------------------------------------------------- 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); |