diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2020-04-12 13:40:43 -0400 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2023-04-12 05:30:43 -0400 |
commit | 5938ad0bdb013953861c7cd15a95f00998a06f44 (patch) | |
tree | 5c760ab363b8c3ee305f1762766af2007cd65b00 /src/wallet/db.h | |
parent | cae0608ad4b195652e0cfcc905e19b50197d43ab (diff) | |
download | bitcoin-5938ad0bdb013953861c7cd15a95f00998a06f44.tar.xz |
wallet: Add DatabaseBatch::ErasePrefix method
This new function is not used yet this commit, but next commit adds usages and
test coverage for both BDB and sqlite.
Diffstat (limited to 'src/wallet/db.h')
-rw-r--r-- | src/wallet/db.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/db.h b/src/wallet/db.h index 2da94885be..6834ba6963 100644 --- a/src/wallet/db.h +++ b/src/wallet/db.h @@ -110,6 +110,7 @@ public: return HasKey(std::move(ssKey)); } + virtual bool ErasePrefix(Span<const std::byte> prefix) = 0; virtual std::unique_ptr<DatabaseCursor> GetNewCursor() = 0; virtual bool TxnBegin() = 0; @@ -186,6 +187,7 @@ private: bool WriteKey(DataStream&& key, DataStream&& value, bool overwrite = true) override { return true; } bool EraseKey(DataStream&& key) override { return true; } bool HasKey(DataStream&& key) override { return true; } + bool ErasePrefix(Span<const std::byte> prefix) override { return true; } public: void Flush() override {} |