aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2020-10-15 20:20:00 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2020-10-20 13:44:43 +0000
commitbbb42a68961a8ae1e4ef3221ffb1d5ff7272b075 (patch)
treea694b56d02255270e31ad657a44b3cefd24583da /src/wallet/rpcwallet.cpp
parent6608fec332eac4dfd91138bc4fe2e1b5c7bb758f (diff)
downloadbitcoin-bbb42a68961a8ae1e4ef3221ffb1d5ff7272b075.tar.xz
RPC: createwallet: Nicer error message if descriptor wallet requested and sqlite support not compiled in
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 23291e3a48..e49e94ee56 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"));
}