RPC: createwallet: Nicer error message if descriptor wallet requested and sqlite support not compiled in

This commit is contained in:
Luke Dashjr committed 2020-10-20 13:44:43 +00:00
1 parent 6608fec332
commit bbb42a6896
1 file changed
+3
+3
View File
@@ -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"));
}