aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/db.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2022-04-11 16:07:58 -0400
committerAndrew Chow <github@achow101.com>2022-12-16 12:35:54 -0500
commitd79e8dcf2981ef1964a2fde8c472b5de1ca1c963 (patch)
tree8331e7c8f23fcdaa0d4f84d45735a34d1be0985f /src/wallet/db.h
parent7a198bba0a1d0a0f0fd4ca947955cb52b84bdd4b (diff)
wallet: Have cursor users use DatabaseCursor directly
Instead of having the DatabaseBatch manage the cursor, having the consumer handle it directly
Diffstat (limited to 'src/wallet/db.h')
-rw-r--r--src/wallet/db.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/wallet/db.h b/src/wallet/db.h
index aa1377ccef..3373bd1de2 100644
--- a/src/wallet/db.h
+++ b/src/wallet/db.h
@@ -38,8 +38,6 @@ public:
class DatabaseBatch
{
private:
- std::unique_ptr<DatabaseCursor> m_cursor;
-
virtual bool ReadKey(CDataStream&& key, CDataStream& value) = 0;
virtual bool WriteKey(CDataStream&& key, CDataStream&& value, bool overwrite=true) = 0;
virtual bool EraseKey(CDataStream&& key) = 0;
@@ -107,20 +105,6 @@ public:
}
virtual std::unique_ptr<DatabaseCursor> GetNewCursor() = 0;
- bool StartCursor()
- {
- m_cursor = GetNewCursor();
- return m_cursor != nullptr;
- }
- bool ReadAtCursor(CDataStream& ssKey, CDataStream& ssValue, bool& complete)
- {
- if (!m_cursor) return false;
- return m_cursor->Next(ssKey, ssValue, complete);
- }
- void CloseCursor()
- {
- m_cursor.reset();
- }
virtual bool TxnBegin() = 0;
virtual bool TxnCommit() = 0;
virtual bool TxnAbort() = 0;