aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-10-19 17:34:20 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-11-18 11:56:12 -0500
commit71e40b33bd1e72ccf5d82e1d3f8b481f8e965492 (patch)
tree1c70bf215aa9d809a5e7a6332592629afdd50872 /src/wallet/rpcwallet.cpp
parent6ebc41bf9cb0184554923e84e1935195d356f2b3 (diff)
RPC: Require descriptors=True for createwallet when BDB is not compiled
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 6efa3d0c27..ace2975e2a 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;