You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #15996: rpc: Deprecate totalfee argument in bumpfee
2f7eb77 Add RPC bumpfee totalFee deprecation test (Jon Atack)
a92d9ce deprecate totalFee argument in bumpfee RPC call (Gregory Sanders)
Pull request description:
totalFee argument is of questionable use, and should be removed in favor of feerate-based features.
I first moved IsDeprecatedRPCEnabled because `bitcoin-wallet` doesn't link `libbitcoin_server`.
ACKs for top commit:
ryanofsky:
utACK 2f7eb77. Only change since last review is leaving IsDeprecatedRPCEnabled in its happy home, and switching to rpcEnableDeprecated instead. (Thanks!)
jonatack:
ACK 2f7eb77. Built locally, manually tested rpc bumpfee, help output ([gist](https://gist.github.com/jonatack/863673eacc02f9da39ff6d6712f9d837)), all tests pass. Travis failures appears to be unrelated, the [bitcoin builds are green](https://bitcoinbuilds.org/index.php?build=121).
meshcollider:
Code Review ACK 2f7eb77
Tree-SHA512: c97465205ee59575df37894bcbb6c4ecf8858dd8fe9d89503f9342b226768c1dcb553153bc9eb3055f7bf5eb41573e48b8efa57e083cd255793cbe5280f0026a
"\nBumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B.\n"
3264
3264
"An opt-in RBF transaction with the given txid must be in the wallet.\n"
3265
3265
"The command will pay the additional fee by reducing change outputs or adding inputs when necessary. It may add a new change output if one does not already exist.\n"
3266
-
"If `totalFee` is given, adding inputs is not supported, so there must be a single change output that is big enough or it will fail.\n"
3266
+
"If `totalFee` (DEPRECATED) is given, adding inputs is not supported, so there must be a single change output that is big enough or it will fail.\n"
3267
3267
"All inputs in the original transaction will be included in the replacement transaction.\n"
3268
3268
"The command will fail if the wallet or mempool contains a transaction that spends one of T's outputs.\n"
3269
3269
"By default, the new fee will be calculated automatically using estimatesmartfee.\n"
3270
3270
"The user can specify a confirmation target for estimatesmartfee.\n"
3271
-
"Alternatively, the user can specify totalFee, or use RPC settxfee to set a higher fee rate.\n"
3271
+
"Alternatively, the user can specify totalFee (DEPRECATED), or use RPC settxfee to set a higher fee rate.\n"
3272
3272
"At a minimum, the new fee rate must be high enough to pay an additional new relay fee (incrementalfee\n"
3273
3273
"returned by getnetworkinfo) to enter the node's mempool.\n",
3274
3274
{
3275
3275
{"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The txid to be bumped"},
if (!pwallet->chain().rpcEnableDeprecated("totalFee")) {
3335
+
throwJSONRPCError(RPC_INVALID_PARAMETER, "totalFee argument has been deprecated and will be removed in 0.20. Please use -deprecatedrpc=totalFee to continue using this argument until removal.");
3336
+
}
3334
3337
totalFee = options["totalFee"].get_int64();
3335
3338
if (totalFee <= 0) {
3336
3339
throwJSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid totalFee %s (must be greater than 0)", FormatMoney(totalFee)));
0 commit comments