Skip to content

Conversation

jonatack
Copy link
Member

@jonatack jonatack commented May 22, 2021

Follow-up to #21544 and #20891 for the bumpfee_helper used for RPCs bumpfee and psbtbumpfee:

  • "psbt" field is only returned in psbtbumpfee and not bumpfee
  • bumpfee raises if private keys are disabled, so the txid help "Only returned when wallet private keys are enabled." no longer makes sense; remove it
  • add missing space in RPC examples ("Bump the fee, get the new transaction'stxid")
  • update txid/psbt code comments

jonatack added 2 commits May 22, 2021 09:22
- "psbt" field is only returned in psbtbumpfee and not bumpfee
- bumpfee raises if privkeys are disabled, so drop "Only returned when wallet private keys are enabled."
- add missing space in RPC example
Copy link
Contributor

@klementtan klementtan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 4f504f8

Tested with:

psbt not returned in bumpfee
./src/bitcoin-cli -signet -rpcwallet="" bumpfee 53fd06a174a6ed139844b73be3a8bd9b6984855dafa38edf9732bfe54a77f39e
{
  "txid": "0bff0a2c14a4d4f624a423d1f5d73dc65f9146d9e33369e8d875c40818d0fff1",
  "origfee": 0.00000141,
  "fee": 0.00000846,
  "errors": [
  ]
}
psbt still returned in psbtbumpfee
./src/bitcoin-cli -signet -rpcwallet="" psbtbumpfee 0bff0a2c14a4d4f624a423d1f5d73dc65f9146d9e33369e8d875c40818d0fff1
{
  "psbt": "cHNidP8BAHECAAAAAR0A8Z1EYfhQgM040NV0jx4/HqaOwCrgHIyIFwsrzPttAQAAAAD9////AmFpmAAAAAAAFgAU++0HvESODcYxKB421Oin6aEIIZgQJwAAAAAAABYAFPQLCGC9h0Zg4cuhpOw9XgcTRHVfe5kAAAABAHECAAAAAYV8foL9SnOL/9hhb7NZ9heas723U9rWTPkmfRASfoyVAQAAAAD+////AlFDF0YAAAAAFgAUT4fSzqO0dT+DMENerKXEPmGwGrCAlpgAAAAAABYAFDjxsgPhvMMM7ScaDBw6f0vGwE+A1JIAAAEBH4CWmAAAAAAAFgAUOPGyA+G8wwztJxoMHDp/S8bAT4AiBgMUuxoE+7GyRBT6D75V2c28R544Ee6cUHmpnQhKdaicPxCk/7hAAAAAgAAAAIABAACAACICAxnzEp1IebkClyUdqFBsJi8shT+2JkDmqYvRpdS8XAEOEKT/uEAAAACAAQAAgAQAAIAAAA==",
  "origfee": 0.00000846,
  "fee": 0.00001551,
  "errors": [
  ]
}
Valid help docs
./src/bitcoin-cli -signet -rpcwallet="" bumpfee
...
Result:
{                    (json object)
  "txid" : "hex",    (string) The id of the new transaction.
  "origfee" : n,     (numeric) The fee of the replaced transaction.
  "fee" : n,         (numeric) The fee of the new transaction.
  "errors" : [       (json array) Errors encountered during processing (may be empty).
    "str",           (string)
    ...
  ]
}

Examples:

Bump the fee, get the new transaction's txid

@maflcko
Copy link
Member

maflcko commented May 25, 2021

Rendered diff:

diff --git a/bumpfee b/bumpfee
index accdd42..6acef40 100644
--- a/bumpfee
+++ b/bumpfee
@@ -40,8 +40,7 @@ Arguments:
 
 Result:
 {                    (json object)
-  "psbt" : "str",    (string) The base64-encoded unsigned PSBT of the new transaction.
-  "txid" : "hex",    (string) The id of the new transaction. Only returned when wallet private keys are enabled.
+  "txid" : "hex",    (string) The id of the new transaction.
   "origfee" : n,     (numeric) The fee of the replaced transaction.
   "fee" : n,         (numeric) The fee of the new transaction.
   "errors" : [       (json array) Errors encountered during processing (may be empty).
@@ -52,5 +51,5 @@ Result:
 
 Examples:
 
-Bump the fee, get the new transaction'stxid
+Bump the fee, get the new transaction's txid
 > bitcoin-cli bumpfee <txid>
diff --git a/psbtbumpfee b/psbtbumpfee
index ac15520..7e4287c 100644
--- a/psbtbumpfee
+++ b/psbtbumpfee
@@ -52,5 +52,5 @@ Result:
 
 Examples:
 
-Bump the fee, get the new transaction'spsbt
+Bump the fee, get the new transaction's psbt
 > bitcoin-cli psbtbumpfee <txid>

@maflcko maflcko merged commit db1aca0 into bitcoin:master May 25, 2021
@jonatack jonatack deleted the bumpfee-psbt-doc-fixes branch May 25, 2021 07:09
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 25, 2021
4f504f8 rpc: fix code comment for bumpfee/psbtbumpfee output (Jon Atack)
5cb7ac2 rpc: fix docs for bumpfee psbt update (Jon Atack)

Pull request description:

  Follow-up to bitcoin#21544 and bitcoin#20891 for the `bumpfee_helper` used for RPCs bumpfee and psbtbumpfee:
  - "psbt" field is only returned in psbtbumpfee and not bumpfee
  - bumpfee raises if private keys are disabled, so the txid help "Only returned when wallet private keys are enabled." no longer makes sense; remove it
  - add missing space in RPC examples ("Bump the fee, get the new transaction'stxid")
  - update txid/psbt code comments

ACKs for top commit:
  klementtan:
    ACK [`4f504f8`](bitcoin@4f504f8)

Tree-SHA512: 194faf8af52383eb8ac5cd22825265931bcde135dac79d8ecc4f84f698070da9b9373c00eef8623961881bb293157c7c9a0d71d1bcccf481ae3605a2d1444ed8
gwillen pushed a commit to ElementsProject/elements that referenced this pull request Jun 1, 2022
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants