aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-04-13 16:28:51 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-06-25 15:32:11 -0400
commit431071c28ae35be8aa012df51233be19067d625c (patch)
tree45a44bc35a490c8ccc5ec3b9f7952eda7937ba0a /src/wallet
parent4638224f64ba7c8ea7c4fb550ec89c6a6d8c7887 (diff)
Hide bumpfee's psbt creation behavior behind -deprecatedrpc
With psbtbumpfee, we can deprecate bumpfee's psbt creation behavior. So put that behind a -deprecatedrpc
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/rpcwallet.cpp3
1 files changed, 3 insertions, 0 deletions
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;
}