diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-05-14 14:06:55 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-05-25 22:23:37 +0100 |
commit | b52abd1370cc21484d64f45504adbab47240debf (patch) | |
tree | 42c9327b4b928d008fcc61e4b7ca09c85ec9ccd9 /src/blockchain_utilities | |
parent | Merge pull request #1956 (diff) | |
download | monero-b52abd1370cc21484d64f45504adbab47240debf.tar.xz |
Move txpool to the database
Integration could go further (ie, return_tx_to_pool calls should
not be needed anymore, possibly other things).
poolstate.bin is now obsolete.
Diffstat (limited to 'src/blockchain_utilities')
-rw-r--r-- | src/blockchain_utilities/blockchain_import.cpp | 2 | ||||
-rw-r--r-- | src/blockchain_utilities/fake_core.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp index b2c217ca1..a43e2b4ad 100644 --- a/src/blockchain_utilities/blockchain_import.cpp +++ b/src/blockchain_utilities/blockchain_import.cpp @@ -443,7 +443,7 @@ int import_from_file(FakeCore& simple_core, const std::string& import_file_path, // tx number 1: coinbase tx // tx number 2 onwards: archived_txs unsigned int tx_num = 1; - for (const transaction& tx : archived_txs) + for (transaction tx : archived_txs) { ++tx_num; // if tx is invalid diff --git a/src/blockchain_utilities/fake_core.h b/src/blockchain_utilities/fake_core.h index 70144184b..809c6fe43 100644 --- a/src/blockchain_utilities/fake_core.h +++ b/src/blockchain_utilities/fake_core.h @@ -59,8 +59,6 @@ struct fake_core_db // for multi_db_runtime: fake_core_db(const boost::filesystem::path &path, const bool use_testnet=false, const bool do_batch=true, const std::string& db_type="lmdb", const int db_flags=0) : m_pool(m_storage), m_storage(m_pool) { - m_pool.init(path.string()); - BlockchainDB* db = nullptr; if (db_type == "lmdb") db = new BlockchainLMDB(); @@ -98,6 +96,8 @@ struct fake_core_db m_storage.init(db, m_hardfork, use_testnet); + m_pool.init(); + if (do_batch) m_storage.get_db().set_batch_transactions(do_batch); support_batch = true; |