aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-31 14:24:06 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-31 14:24:06 +0000
commit40f97ce83da9199acfc7dc9105712888a7af099c (patch)
tree40a81490a551cef0b43ed68f8e61edc86268ee3f /src/cryptonote_core/tx_pool.cpp
parentMerge pull request #584 (diff)
downloadmonero-40f97ce83da9199acfc7dc9105712888a7af099c.tar.xz
core: do not use the persistent pool state for tests
Fixes intermittent test failures when the pool contains unexpected transactions that were brought in from the live pool.
Diffstat (limited to 'src/cryptonote_core/tx_pool.cpp')
-rw-r--r--src/cryptonote_core/tx_pool.cpp6
1 files changed, 6 insertions, 0 deletions
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);