From bbb42a68961a8ae1e4ef3221ffb1d5ff7272b075 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 15 Oct 2020 20:20:00 +0000 Subject: [PATCH] RPC: createwallet: Nicer error message if descriptor wallet requested and sqlite support not compiled in --- src/wallet/rpcwallet.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 23291e3a483..e49e94ee56b 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2740,6 +2740,9 @@ static RPCHelpMan createwallet() flags |= WALLET_FLAG_AVOID_REUSE; } if (!request.params[5].isNull() && request.params[5].get_bool()) { +#ifndef USE_SQLITE + throw JSONRPCError(RPC_WALLET_ERROR, "Compiled without sqlite support (required for descriptor wallets)"); +#endif flags |= WALLET_FLAG_DESCRIPTORS; warnings.emplace_back(Untranslated("Wallet is an experimental descriptor wallet")); }