From 431071c28ae35be8aa012df51233be19067d625c Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 13 Apr 2020 16:28:51 -0400 Subject: Hide bumpfee's psbt creation behavior behind -deprecatedrpc With psbtbumpfee, we can deprecate bumpfee's psbt creation behavior. So put that behind a -deprecatedrpc --- src/wallet/rpcwallet.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/wallet/rpcwallet.cpp') diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 6bc0d87433..f3c5ae99fd 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3306,6 +3306,9 @@ static UniValue bumpfee(const JSONRPCRequest& request) CWallet* const pwallet = wallet.get(); if (pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS) && !want_psbt) { + if (!pwallet->chain().rpcEnableDeprecated("bumpfee")) { + throw JSONRPCError(RPC_METHOD_DEPRECATED, "Using bumpfee with wallets that have private keys disabled is deprecated. Use psbtbumpfee instead or restart bitcoind with -deprecatedrpc=bumpfee. This functionality will be removed in 0.22"); + } want_psbt = true; } -- cgit v1.2.3