Merge bitcoin/bitcoin#31961: Require sqlite when building the wallet

36b6f36ac4 build: require sqlite when building the wallet (Sjors Provoost)

Pull request description:

  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.

  This is another step towards dropping the legacy wallet, extracted from #31250.

ACKs for top commit:
  m3dwards:
    ACK 36b6f36ac4
  davidgumberg:
    crACK 36b6f36ac4
  hebasto:
    re-ACK 36b6f36ac4.

Tree-SHA512: 870a0135671c80c4f28602119eb8637a1ed43b51b1673bfe88425782fb62ec6ef0f3d6baf0d5984d6a243779b0f63423fd4c4dc324ef87bffba13d63e05ad793
This commit is contained in:
merge-script
2025-03-14 11:23:35 +08:00
40 changed files with 33 additions and 142 deletions

View File

@@ -3,7 +3,6 @@
// file COPYING or https://www.opensource.org/licenses/mit-license.php.
#include <bench/bench.h>
#include <bitcoin-build-config.h> // IWYU pragma: keep
#include <random.h>
#include <support/allocators/secure.h>
#include <test/util/setup_common.h>
@@ -61,9 +60,7 @@ static void WalletCreate(benchmark::Bench& bench, bool encrypted)
static void WalletCreatePlain(benchmark::Bench& bench) { WalletCreate(bench, /*encrypted=*/false); }
static void WalletCreateEncrypted(benchmark::Bench& bench) { WalletCreate(bench, /*encrypted=*/true); }
#ifdef USE_SQLITE
BENCHMARK(WalletCreatePlain, benchmark::PriorityLevel::LOW);
BENCHMARK(WalletCreateEncrypted, benchmark::PriorityLevel::LOW);
#endif
} // namespace wallet

View File

@@ -75,10 +75,8 @@ static void WalletIsMineLegacy(benchmark::Bench& bench) { WalletIsMine(bench, /*
BENCHMARK(WalletIsMineLegacy, benchmark::PriorityLevel::LOW);
#endif
#ifdef USE_SQLITE
static void WalletIsMineDescriptors(benchmark::Bench& bench) { WalletIsMine(bench, /*legacy_wallet=*/false); }
static void WalletIsMineMigratedDescriptors(benchmark::Bench& bench) { WalletIsMine(bench, /*legacy_wallet=*/false, /*num_combo=*/2000); }
BENCHMARK(WalletIsMineDescriptors, benchmark::PriorityLevel::LOW);
BENCHMARK(WalletIsMineMigratedDescriptors, benchmark::PriorityLevel::LOW);
#endif
} // namespace wallet

View File

@@ -73,8 +73,6 @@ static void WalletLoadingLegacy(benchmark::Bench& bench) { WalletLoading(bench,
BENCHMARK(WalletLoadingLegacy, benchmark::PriorityLevel::HIGH);
#endif
#ifdef USE_SQLITE
static void WalletLoadingDescriptors(benchmark::Bench& bench) { WalletLoading(bench, /*legacy_wallet=*/false); }
BENCHMARK(WalletLoadingDescriptors, benchmark::PriorityLevel::HIGH);
#endif
} // namespace wallet

View File

@@ -2,8 +2,6 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://www.opensource.org/licenses/mit-license.php.
#include <bitcoin-build-config.h> // IWYU pragma: keep
#include <bench/bench.h>
#include <kernel/chain.h>
#include <interfaces/chain.h>
@@ -17,8 +15,6 @@
#include <optional>
#if defined(USE_SQLITE) // only enable benchmark when sqlite is enabled
namespace wallet{
static void WalletMigration(benchmark::Bench& bench)
@@ -75,5 +71,3 @@ static void WalletMigration(benchmark::Bench& bench)
BENCHMARK(WalletMigration, benchmark::PriorityLevel::LOW);
} // namespace wallet
#endif // end USE_SQLITE && USE_BDB