aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/bdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/bdb.h')
-rw-r--r--src/wallet/bdb.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/bdb.h b/src/wallet/bdb.h
index fbec0bb90b..4fac128bf1 100644
--- a/src/wallet/bdb.h
+++ b/src/wallet/bdb.h
@@ -14,6 +14,7 @@
#include <wallet/db.h>
#include <atomic>
+#include <condition_variable>
#include <map>
#include <memory>
#include <string>
@@ -191,10 +192,11 @@ private:
Dbc* m_cursor;
public:
- explicit BerkeleyCursor(BerkeleyDatabase& database);
+ explicit BerkeleyCursor(BerkeleyDatabase& database, BerkeleyBatch* batch=nullptr);
~BerkeleyCursor() override;
Status Next(DataStream& key, DataStream& value) override;
+ Dbc* dbc() const { return m_cursor; }
};
/** RAII class that provides access to a Berkeley database */
@@ -205,6 +207,7 @@ private:
bool WriteKey(DataStream&& key, DataStream&& value, bool overwrite = true) override;
bool EraseKey(DataStream&& key) override;
bool HasKey(DataStream&& key) override;
+ bool ErasePrefix(Span<const std::byte> prefix) override;
protected:
Db* pdb{nullptr};
@@ -229,6 +232,7 @@ public:
bool TxnBegin() override;
bool TxnCommit() override;
bool TxnAbort() override;
+ DbTxn* txn() const { return activeTxn; }
};
std::string BerkeleyDatabaseVersion();