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
2024-01-02 16:35:07 -05:00
parent ca18aea5c4
commit 756ff9b478
3 changed files with 147 additions and 0 deletions

37
src/wallet/migrate.cpp Normal file
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