aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-08-12 09:50:48 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-09-09 12:02:25 +0000
commit80e4fef3c6bc423bec147d936685a827a4300c31 (patch)
tree45cf34b46b70321165c1b22ce97374ade3bcbc7b /src
parentblockchain_blackball: add stats (diff)
downloadmonero-80e4fef3c6bc423bec147d936685a827a4300c31.tar.xz
blockchain_blackball: set transaction looping txn to read only
Diffstat (limited to 'src')
-rw-r--r--src/blockchain_utilities/blockchain_blackball.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blockchain_utilities/blockchain_blackball.cpp b/src/blockchain_utilities/blockchain_blackball.cpp
index 7f80eecef..833a19a0b 100644
--- a/src/blockchain_utilities/blockchain_blackball.cpp
+++ b/src/blockchain_utilities/blockchain_blackball.cpp
@@ -341,7 +341,7 @@ static bool for_all_transactions(const std::string &filename, uint64_t &start_id
if (dbr) throw std::runtime_error("Failed to open rings database file '"
+ actual_filename + "': " + std::string(mdb_strerror(dbr)));
- dbr = mdb_txn_begin(env, NULL, 0, &txn);
+ dbr = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
if (dbr) throw std::runtime_error("Failed to create LMDB transaction: " + std::string(mdb_strerror(dbr)));
epee::misc_utils::auto_scope_leave_caller txn_dtor = epee::misc_utils::create_scope_leave_handler([&](){if (tx_active) mdb_txn_abort(txn);});
tx_active = true;