aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-10-29 12:03:31 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-10-29 12:03:36 +0100
commitf3727fd73538b3a097559cc1005c08caa2bdf1dd (patch)
tree21e703c3f0b36318ac970316d1cf79fc1bd7739c /src/wallet/rpcwallet.cpp
parent924a4ff7eb626185684a4524bb0acea7e2904db8 (diff)
parentbbb42a68961a8ae1e4ef3221ffb1d5ff7272b075 (diff)
downloadbitcoin-f3727fd73538b3a097559cc1005c08caa2bdf1dd.tar.xz
Merge #20156: build: Make sqlite support optional (compile-time)
bbb42a68961a8ae1e4ef3221ffb1d5ff7272b075 RPC: createwallet: Nicer error message if descriptor wallet requested and sqlite support not compiled in (Luke Dashjr) 6608fec332eac4dfd91138bc4fe2e1b5c7bb758f GUI: Create Wallet: Nicely disable descriptor wallet checkbox if sqlite support not compiled in (Luke Dashjr) 7b54d768e1514b328e1ac108d3db2f1bac3ba7ff Make sqlite support optional (compile-time) (Luke Dashjr) Pull request description: As a new requirement, sqlite support should be optional. This PR aims to be only minimum/blocker changes for 0.21. Potential follow-up PRs after this: * Make BDB support optional * Nicer error messages when user tries to load an unsupported wallet * Don't compile descriptor wallet code if sqlite disabled ACKs for top commit: jonasschnelli: Tested ACK bbb42a68961a8ae1e4ef3221ffb1d5ff7272b075 achow101: ACK bbb42a68961a8ae1e4ef3221ffb1d5ff7272b075 Sjors: re-utACK bbb42a68961a8ae1e4ef3221ffb1d5ff7272b075 hebasto: ACK bbb42a68961a8ae1e4ef3221ffb1d5ff7272b075, tested on Linux Mint 20 (x86_64, Qt 5.12.8). Tree-SHA512: 500209dd1971310fab8ae51543343ce0ba91f088ccccff6109b4cc27547cd5532289dca6cb7dac2a7d7c59cdf3c8f5aacc31e9b0f912e38cea52ec26b97100bd
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 29b55ec130..086ffa1272 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -2742,6 +2742,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"));
}