#include <db_lmdb.h>
Definition at line 140 of file db_lmdb.h.
◆ mdb_txn_safe()
| cryptonote::mdb_txn_safe::mdb_txn_safe |
( |
const bool | check = true | ) |
|
Definition at line 407 of file db_lmdb.cpp.
408{
409 if (check)
410 {
414 }
415}
static std::atomic< uint64_t > num_active_txns
static std::atomic_flag creation_gate
◆ ~mdb_txn_safe()
| cryptonote::mdb_txn_safe::~mdb_txn_safe |
( |
| ) |
|
Definition at line 417 of file db_lmdb.cpp.
418{
420 return;
423 {
426 }
else if (
m_txn !=
nullptr)
427 {
429 {
430 LOG_PRINT_L0(
"WARNING: mdb_txn_safe: m_txn is a batch txn and it's not NULL in destructor - calling mdb_txn_abort()");
431 }
432 else
433 {
434
435
436
437
438
439
440 LOG_PRINT_L3(
"mdb_txn_safe: m_txn not NULL in destructor - calling mdb_txn_abort()");
441 }
443 }
445}
void mdb_txn_reset(MDB_txn *txn)
Reset a read-only transaction.
void mdb_txn_abort(MDB_txn *txn)
Abandon all the operations of the transaction instead of saving them.
◆ abort()
| void cryptonote::mdb_txn_safe::abort |
( |
| ) |
|
Definition at line 468 of file db_lmdb.cpp.
469{
472 {
475 }
476 else
477 {
478 LOG_PRINT_L0(
"WARNING: mdb_txn_safe: abort() called, but m_txn is NULL");
479 }
480}
◆ allow_new_txns()
| void cryptonote::mdb_txn_safe::allow_new_txns |
( |
| ) |
|
|
static |
◆ commit()
| void cryptonote::mdb_txn_safe::commit |
( |
std::string | message = "" | ) |
|
Definition at line 453 of file db_lmdb.cpp.
454{
456 {
457 message =
"Failed to commit a transaction to the db";
458 }
459
461 {
463 throw0(DB_ERROR(lmdb_error(
message +
": ", result).c_str()));
464 }
466}
std::string message("Message requiring signing")
int mdb_txn_commit(MDB_txn *txn)
Commit all the operations of a transaction into the database.
◆ num_active_tx()
| uint64_t cryptonote::mdb_txn_safe::num_active_tx |
( |
| ) |
const |
◆ operator MDB_txn *()
| cryptonote::mdb_txn_safe::operator MDB_txn * |
( |
| ) |
|
|
inline |
◆ operator MDB_txn **()
| cryptonote::mdb_txn_safe::operator MDB_txn ** |
( |
| ) |
|
|
inline |
◆ prevent_new_txns()
| void cryptonote::mdb_txn_safe::prevent_new_txns |
( |
| ) |
|
|
static |
◆ uncheck()
| void cryptonote::mdb_txn_safe::uncheck |
( |
| ) |
|
◆ wait_no_active_txns()
| void cryptonote::mdb_txn_safe::wait_no_active_txns |
( |
| ) |
|
|
static |
◆ creation_gate
| std::atomic_flag cryptonote::mdb_txn_safe::creation_gate = ATOMIC_FLAG_INIT |
|
static |
◆ m_batch_txn
| bool cryptonote::mdb_txn_safe::m_batch_txn = false |
◆ m_check
| bool cryptonote::mdb_txn_safe::m_check |
◆ m_tinfo
◆ m_txn
| MDB_txn* cryptonote::mdb_txn_safe::m_txn |
◆ num_active_txns
| std::atomic< uint64_t > cryptonote::mdb_txn_safe::num_active_txns {0} |
|
static |
The documentation for this struct was generated from the following files:
- /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/src/blockchain_db/lmdb/db_lmdb.h
- /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/src/blockchain_db/lmdb/db_lmdb.cpp