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

Method TxnCommit

src/wallet/sqlite.cpp:673–685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671}
672
673bool SQLiteBatch::TxnCommit()
674{
675 if (!m_database.m_db || !m_txn) return false;
676 Assert(m_database.HasActiveTxn());
677 int res = Assert(m_exec_handler)->Exec(m_database, "COMMIT TRANSACTION");
678 if (res != SQLITE_OK) {
679 LogWarning("SQLiteBatch: Failed to commit the transaction");
680 } else {
681 m_txn = false;
682 m_database.m_write_semaphore.release();
683 }
684 return res == SQLITE_OK;
685}
686
687bool SQLiteBatch::TxnAbort()
688{

Callers 9

ExportWatchOnlyWalletFunction · 0.45
MigrateToDescriptorMethod · 0.45
TopUpMethod · 0.45
EncryptWalletMethod · 0.45
MigrateToSQLiteMethod · 0.45
ApplyMigrationDataMethod · 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