aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/sqlite.h
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2024-01-15 20:18:34 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2024-01-30 17:27:20 -0300
commit472d2ca98170049e0edec830e2d11c5ef23740a4 (patch)
tree486a9314ebc07c92d7184556b349242ea83d1ca8 /src/wallet/sqlite.h
parentdca874e838c2599bd24433675b291168f8e7b055 (diff)
downloadbitcoin-472d2ca98170049e0edec830e2d11c5ef23740a4.tar.xz
sqlite: introduce HasActiveTxn method
Util function to clean up code and let us verify, in the following-up commit, that dangling, to-be-reverted db transactions cannot occur anymore.
Diffstat (limited to 'src/wallet/sqlite.h')
-rw-r--r--src/wallet/sqlite.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/sqlite.h b/src/wallet/sqlite.h
index de9ba8fd99..ad91be1064 100644
--- a/src/wallet/sqlite.h
+++ b/src/wallet/sqlite.h
@@ -154,6 +154,9 @@ public:
/** Make a SQLiteBatch connected to this database */
std::unique_ptr<DatabaseBatch> MakeBatch(bool flush_on_close = true) override;
+ /** Return true if there is an on-going txn in this connection */
+ bool HasActiveTxn();
+
sqlite3* m_db{nullptr};
bool m_use_unsafe_sync;
};