aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/wallet.cpp
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-10-05 15:54:19 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-10-05 15:47:44 +0200
commitfa071aeb61dcc42cd122d3fb1abe4b9c238f8010 (patch)
tree83359cba247673d9b57e1dd1143c07c19dba0ff2 /src/wallet/rpc/wallet.cpp
parent52c6904c789103a316253df4cb20aa785b2afc42 (diff)
wallet: No BDB creation, unless -deprecatedrpc=create_bdb
Diffstat (limited to 'src/wallet/rpc/wallet.cpp')
-rw-r--r--src/wallet/rpc/wallet.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/wallet/rpc/wallet.cpp b/src/wallet/rpc/wallet.cpp
index 3774e6a3ef..164ce9afed 100644
--- a/src/wallet/rpc/wallet.cpp
+++ b/src/wallet/rpc/wallet.cpp
@@ -343,7 +343,7 @@ static RPCHelpMan createwallet()
{"passphrase", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Encrypt the wallet with this passphrase."},
{"avoid_reuse", RPCArg::Type::BOOL, RPCArg::Default{false}, "Keep track of coin reuse, and treat dirty and clean coins differently with privacy considerations in mind."},
{"descriptors", RPCArg::Type::BOOL, RPCArg::Default{true}, "Create a native descriptor wallet. The wallet will use descriptors internally to handle address creation."
- " Setting to \"false\" will create a legacy wallet; however, the legacy wallet type is being deprecated and"
+ " Setting to \"false\" will create a legacy wallet; This is only possible with the -deprecatedrpc=create_bdb setting because, the legacy wallet type is being deprecated and"
" support for creating and opening legacy wallets will be removed in the future."},
{"load_on_startup", RPCArg::Type::BOOL, RPCArg::Optional::OMITTED, "Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged."},
{"external_signer", RPCArg::Type::BOOL, RPCArg::Default{false}, "Use an external signer such as a hardware wallet. Requires -signer to be configured. Wallet creation will fail if keys cannot be fetched. Requires disable_private_keys and descriptors set to true."},
@@ -389,11 +389,16 @@ static RPCHelpMan createwallet()
if (!request.params[4].isNull() && request.params[4].get_bool()) {
flags |= WALLET_FLAG_AVOID_REUSE;
}
- if (request.params[5].isNull() || request.params[5].get_bool()) {
+ if (self.Arg<bool>(5)) {
#ifndef USE_SQLITE
throw JSONRPCError(RPC_WALLET_ERROR, "Compiled without sqlite support (required for descriptor wallets)");
#endif
flags |= WALLET_FLAG_DESCRIPTORS;
+ } else {
+ if (!context.chain->rpcEnableDeprecated("create_bdb")) {
+ throw JSONRPCError(RPC_WALLET_ERROR, "BDB wallet creation is deprecated and will be removed in a future release."
+ " In this release it can be re-enabled temporarily with the -deprecatedrpc=create_bdb setting.");
+ }
}
if (!request.params[7].isNull() && request.params[7].get_bool()) {
#ifdef ENABLE_EXTERNAL_SIGNER