diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-03-19 15:27:02 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-03-19 15:27:02 +0200 |
commit | d7fb03fc97794febeb29f1983e313e1b9d1d85e6 (patch) | |
tree | 908862cd20f33bcfdefe8f39047a3d8a9b2b433a | |
parent | Merge pull request #731 (diff) | |
parent | Reduce log noise (diff) | |
download | monero-d7fb03fc97794febeb29f1983e313e1b9d1d85e6.tar.xz |
Merge pull request #732
db1b2db Reduce log noise (Howard Chu)
9b3e43c Fix issue #706 (Howard Chu)
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.cpp | 5 | ||||
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp index 9ae7b404b..4e30548fc 100644 --- a/src/blockchain_db/lmdb/db_lmdb.cpp +++ b/src/blockchain_db/lmdb/db_lmdb.cpp @@ -240,6 +240,8 @@ mdb_txn_safe::mdb_txn_safe(const bool check) : m_txn(NULL), m_tinfo(NULL), m_che mdb_txn_safe::~mdb_txn_safe() { + if (!m_check) + return; LOG_PRINT_L3("mdb_txn_safe: destructor"); if (m_tinfo != nullptr) { @@ -263,8 +265,7 @@ mdb_txn_safe::~mdb_txn_safe() } mdb_txn_abort(m_txn); } - if (m_check) - num_active_txns--; + num_active_txns--; } void mdb_txn_safe::commit(std::string message) diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index f540697dc..8b7f298ee 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -2798,6 +2798,7 @@ void Blockchain::check_against_checkpoints(const checkpoints& points, bool enfor { const auto& pts = points.get_points(); + CRITICAL_REGION_LOCAL(m_blockchain_lock); m_db->batch_start(); for (const auto& pt : pts) { |