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

This commit is contained in:
Andrew Chow 2020-10-19 17:34:20 -04:00
parent 6ebc41bf9c
commit 71e40b33bd

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;