wallet: add dummy BerkeleyRODatabase and BerkeleyROBatch classes

BerkeleyRODatabase and BerkeleyROBatch will be used to access a BDB file
without the use of BDB. For now, these are dummy classes.
This commit is contained in:
Ava Chow committed 2024-05-13 23:01:06 -04:00
1 parent ca18aea5c4
commit 756ff9b478
3 files changed
+147

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <wallet/migrate.h>
namespace wallet {
void BerkeleyRODatabase::Open()
{
}
std::unique_ptr<DatabaseBatch> BerkeleyRODatabase::MakeBatch(bool flush_on_close)
{
return std::make_unique<BerkeleyROBatch>(*this);
}
bool BerkeleyRODatabase::Backup(const std::string& dest) const
{
return false;
}
bool BerkeleyROBatch::ReadKey(DataStream&& key, DataStream& value)
{
return false;
}
bool BerkeleyROBatch::HasKey(DataStream&& key)
{
return false;
}
DatabaseCursor::Status BerkeleyROCursor::Next(DataStream& ssKey, DataStream& ssValue)
{
return DatabaseCursor::Status::FAIL;
}
} // namespace wallet