Skip to content

Commit

Permalink
fix: descriptor wallets follow-up for bitcoin#20156: Make sqlite supp…
Browse files Browse the repository at this point in the history
…ort optional (compile-time)
  • Loading branch information
knst committed Mar 6, 2024
1 parent fa30777 commit 343d4b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/qt/createwalletdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
ui->encrypt_wallet_checkbox->setChecked(false);
}
});

#ifndef USE_SQLITE
ui->descriptor_checkbox->setToolTip(tr("Compiled without sqlite support (required for descriptor wallets)"));
ui->descriptor_checkbox->setEnabled(false);
ui->descriptor_checkbox->setChecked(false);
#endif
}

CreateWalletDialog::~CreateWalletDialog()
Expand Down
3 changes: 3 additions & 0 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2934,6 +2934,9 @@ static UniValue createwallet(const JSONRPCRequest& request)
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"));
}
Expand Down

0 comments on commit 343d4b0

Please sign in to comment.