mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-26 14:59:16 +02:00
build: require sqlite when building the wallet
Require that sqlite is available in order to compile the wallet. Removes instances of USE_SQLITE since it is no longer possible to not have sqlite available. The NO_SQLITE option is dropped from depends. Co-authored-by: Ava Chow <github@achow101.com> Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
This commit is contained in:
@@ -22,9 +22,7 @@
|
||||
#include <wallet/bdb.h>
|
||||
#endif
|
||||
#include <wallet/migrate.h>
|
||||
#ifdef USE_SQLITE
|
||||
#include <wallet/sqlite.h>
|
||||
#endif
|
||||
#include <wallet/wallet.h>
|
||||
|
||||
#include <atomic>
|
||||
@@ -1464,25 +1462,14 @@ std::unique_ptr<WalletDatabase> MakeDatabase(const fs::path& path, const Databas
|
||||
|
||||
// If the format is not specified or detected, choose the default format based on what is available. We prefer BDB over SQLite for now.
|
||||
if (!format) {
|
||||
#ifdef USE_SQLITE
|
||||
format = DatabaseFormat::SQLITE;
|
||||
#endif
|
||||
#ifdef USE_BDB
|
||||
format = DatabaseFormat::BERKELEY;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (format == DatabaseFormat::SQLITE) {
|
||||
#ifdef USE_SQLITE
|
||||
if constexpr (true) {
|
||||
return MakeSQLiteDatabase(path, options, status, error);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
error = Untranslated(strprintf("Failed to open database path '%s'. Build does not support SQLite database format.", fs::PathToString(path)));
|
||||
status = DatabaseStatus::FAILED_BAD_FORMAT;
|
||||
return nullptr;
|
||||
}
|
||||
return MakeSQLiteDatabase(path, options, status, error);
|
||||
}
|
||||
|
||||
if (format == DatabaseFormat::BERKELEY_RO) {
|
||||
|
||||
Reference in New Issue
Block a user