aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authorThomas Winget <tewinget@gmail.com>2015-02-23 18:24:59 -0500
committerThomas Winget <tewinget@gmail.com>2015-02-23 18:24:59 -0500
commitb5796da0fa67269ed218cdd14ef9f3b548fd6507 (patch)
treea64104230bd0d8ddfac59d119de7fd36dc4f48e6 /src/cryptonote_core/blockchain.cpp
parentMerge pull request #31 from warptangent/fix/fix_get_tail_id (diff)
parentBlockchainLMDB: Add profiling to tx_exists() (diff)
downloadmonero-b5796da0fa67269ed218cdd14ef9f3b548fd6507.tar.xz
Merge #32
Add support to BlockchainDB and BlockchainLMDB for batch transactions. Add profiling to block and tx processing and DB operations. Improve block and tx processing efficiency by less repeat hashing. Move LMDB storage to "lmdb" subfolder. - Upon startup, if old LMDB files are detected, abort with a message for the user to move them to subfolder or delete them. Update and fix log statements and formatting.
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 525c7f36e..b2d979432 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -237,8 +237,9 @@ bool Blockchain::init(const std::string& config_folder, bool testnet)
m_testnet = testnet;
boost::filesystem::path folder(m_config_folder);
+ folder /= "lmdb";
- LOG_PRINT_L0("Loading blockchain...");
+ LOG_PRINT_L0("Loading blockchain from folder " << folder.c_str() << " ...");
//FIXME: update filename for BlockchainDB
const std::string filename = folder.string();
@@ -2288,7 +2289,7 @@ bool Blockchain::add_new_block(const block& bl_, block_verification_context& bvc
return handle_block_to_main_chain(bl, id, bvc);
}
//------------------------------------------------------------------
-void Blockchain::check_against_checkpoints(checkpoints& points, bool enforce)
+void Blockchain::check_against_checkpoints(const checkpoints& points, bool enforce)
{
const auto& pts = points.get_points();