RPC: Require descriptors=True for createwallet when BDB is not compiled

This commit is contained in:
Andrew Chow committed 2020-11-18 11:56:12 -05:00
1 parent 6ebc41bf9c
commit 71e40b33bd
1 file changed
+6
+6
View File
@@ -2764,6 +2764,12 @@ static RPCHelpMan createwallet()
warnings.emplace_back(Untranslated("Wallet is an experimental descriptor wallet"));
}
#ifndef USE_BDB
if (!(flags & WALLET_FLAG_DESCRIPTORS)) {
throw JSONRPCError(RPC_WALLET_ERROR, "Compiled without bdb support (required for legacy wallets)");
}
#endif
DatabaseOptions options;
DatabaseStatus status;
options.require_create = true;