Skip to content

Commit

Permalink
Merge pull request #586
Browse files Browse the repository at this point in the history
40f97ce core: do not use the persistent pool state for tests (moneromooo-monero)
  • Loading branch information
fluffypony committed Dec 31, 2015
2 parents e739baf + 40f97ce commit c991865
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cryptonote_core/cryptonote_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/cryptonote_core/tx_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c991865

Please sign in to comment.