Skip to content

Commit 71e40b3

Browse files
committed
RPC: Require descriptors=True for createwallet when BDB is not compiled
1 parent 6ebc41b commit 71e40b3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2764,6 +2764,12 @@ static RPCHelpMan createwallet()
27642764
warnings.emplace_back(Untranslated("Wallet is an experimental descriptor wallet"));
27652765
}
27662766

2767+
#ifndef USE_BDB
2768+
if (!(flags & WALLET_FLAG_DESCRIPTORS)) {
2769+
throw JSONRPCError(RPC_WALLET_ERROR, "Compiled without bdb support (required for legacy wallets)");
2770+
}
2771+
#endif
2772+
27672773
DatabaseOptions options;
27682774
DatabaseStatus status;
27692775
options.require_create = true;

0 commit comments

Comments
 (0)