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 #15557: Enhance bumpfee to include inputs when targeting a feerate
184f878 wallet_bumpfee.py: add test for change key preservation (Gregory Sanders)
d08becf add functional tests for feerate bumpfee with adding inputs (Gregory Sanders)
0ea47ba generalize bumpfee to add inputs when needed (Gregory Sanders)
Pull request description:
When targeting a feerate using `bumpfee`, call a new function that directly uses `CWallet::CreateTransaction` and coin control to get the desired result. This allows us to get a superset of previous behavior, with an arbitrary RBF bump of a transaction provided it passes the preconditional checks and spare confirmed utxos are available.
Note(s):
0) The coin selection will use knapsack solver for the residual selection.
1) This functionality, just like knapsack coin selection in general, will hoover up negative-value inputs when given the chance.
2) Newly added inputs must be confirmed due to current Core policy. See error: `replacement-adds-unconfirmed`
3) Supporting this with `totalFee` is difficult since the "minimum total fee" option in `CreateTransaction` logic was (rightly)taken out in #10390 .
ACKs for commit 184f87:
jnewbery:
utACK 184f878
Tree-SHA512: fb6542bdfb2c6010e328ec475cf9dcbff4eb2b1a1b27f78010214534908987a5635797196fa05edddffcbcf2987335872dc644a99261886d5cbb34a8f262ad3e
"\nBumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B.\n"
3169
3169
"An opt-in RBF transaction with the given txid must be in the wallet.\n"
3170
-
"The command will pay the additional fee by decreasing (or perhaps removing) its change output.\n"
3171
-
"If the change output is not big enough to cover the increased fee, the command will currently fail\n"
3172
-
"instead of adding new inputs to compensate. (A future implementation could improve this.)\n"
3170
+
"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"
3171
+
"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"
3172
+
"All inputs in the original transaction will be included in the replacement transaction.\n"
3173
3173
"The command will fail if the wallet or mempool contains a transaction that spends one of T's outputs.\n"
3174
3174
"By default, the new fee will be calculated automatically using estimatesmartfee.\n"
3175
3175
"The user can specify a confirmation target for estimatesmartfee.\n"
0 commit comments