RPC: createwallet: Nicer error message if descriptor wallet requested and sqlite support not compiled in
This commit is contained in:
1 parent
6608fec332
commit
bbb42a6896
1 file changed
+3
@@ -2740,6 +2740,9 @@ static RPCHelpMan createwallet()
|
|||||||
flags |= WALLET_FLAG_AVOID_REUSE;
|
flags |= WALLET_FLAG_AVOID_REUSE;
|
||||||
}
|
}
|
||||||
if (!request.params[5].isNull() && request.params[5].get_bool()) {
|
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;
|
flags |= WALLET_FLAG_DESCRIPTORS;
|
||||||
warnings.emplace_back(Untranslated("Wallet is an experimental descriptor wallet"));
|
warnings.emplace_back(Untranslated("Wallet is an experimental descriptor wallet"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user