MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / TxnAbort

Method TxnAbort

src/wallet/sqlite.cpp:687–699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

685}
686
687bool SQLiteBatch::TxnAbort()
688{
689 if (!m_database.m_db || !m_txn) return false;
690 Assert(m_database.HasActiveTxn());
691 int res = Assert(m_exec_handler)->Exec(m_database, "ROLLBACK TRANSACTION");
692 if (res != SQLITE_OK) {
693 LogWarning("SQLiteBatch: Failed to abort the transaction");
694 } else {
695 m_txn = false;
696 m_database.m_write_semaphore.release();
697 }
698 return res == SQLITE_OK;
699}
700
701std::unique_ptr<SQLiteDatabase> MakeSQLiteDatabase(const fs::path& path, const DatabaseOptions& options, DatabaseStatus& status, bilingual_str& error)
702{

Callers 4

EncryptWalletMethod · 0.45
MigrateToSQLiteMethod · 0.45
CreateFromDumpFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45

Calls 3

releaseMethod · 0.80
HasActiveTxnMethod · 0.45
ExecMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.36