From 71e40b33bd1e72ccf5d82e1d3f8b481f8e965492 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 19 Oct 2020 17:34:20 -0400 Subject: [PATCH] RPC: Require descriptors=True for createwallet when BDB is not compiled --- src/wallet/rpcwallet.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 6efa3d0c27b..ace2975e2ab 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2764,6 +2764,12 @@ static RPCHelpMan createwallet() warnings.emplace_back(Untranslated("Wallet is an experimental descriptor wallet")); } +#ifndef USE_BDB + if (!(flags & WALLET_FLAG_DESCRIPTORS)) { + throw JSONRPCError(RPC_WALLET_ERROR, "Compiled without bdb support (required for legacy wallets)"); + } +#endif + DatabaseOptions options; DatabaseStatus status; options.require_create = true;