-
Notifications
You must be signed in to change notification settings - Fork 38.7k
doc: Use DecodeTxDoc helper #24721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: Use DecodeTxDoc helper #24721
The head ref may contain hidden characters: "2203-doc-rpc-raw-tx-\u{1F681}"
Conversation
Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
|
Rendered diff is move-only: diff --git a/getrawtransaction b/getrawtransaction
index e1a266d..ae73e6b 100644
--- a/getrawtransaction
+++ b/getrawtransaction
@@ -23,6 +23,10 @@ Result (if verbose is not set or set to false):
Result (if verbose is set to true):
{ (json object)
"in_active_chain" : true|false, (boolean, optional) Whether specified block is in the active chain or not (only present with explicit "blockhash" argument)
+ "blockhash" : "hex", (string, optional) the block hash
+ "confirmations" : n, (numeric, optional) The confirmations
+ "blocktime" : xxx, (numeric, optional) The block time expressed in UNIX epoch time
+ "time" : n, (numeric, optional) Same as "blocktime"
"hex" : "hex", (string) The serialized, hex-encoded data for 'txid'
"txid" : "hex", (string) The transaction id (same as provided)
"hash" : "hex", (string) The transaction hash (differs from txid for witness transactions)
@@ -61,11 +65,7 @@ Result (if verbose is set to true):
}
},
...
- ],
- "blockhash" : "hex", (string, optional) the block hash
- "confirmations" : n, (numeric, optional) The confirmations
- "blocktime" : xxx, (numeric, optional) The block time expressed in UNIX epoch time
- "time" : n (numeric, optional) Same as "blocktime"
+ ]
}
Examples: |
fanquake
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa58427
shaavan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa58427
- This newly introduced helper function, DecodeTxDoc, helps display all the text in the RPC help message for getting a transaction and decoderawtransaction.
- Since almost all the text in both of these functions help message is the same, this function helps remove the redundant lines of code while ensuring consistency in the displayed message for both these RPC commands.
- I compiled the PR successfully, and I was able to verify that the displayed RPC help message is unchanged.
|
I want to bring a point to notice. While compiling the PR, I got a bunch of repeated (same) warnings, whose screenshot I am adding here. Since this doesn't seem relevant to this PR, I am adding it as a separate comment. I am running bitcoin core on Ubuntu 20.04. I am not sure if this is a genuine issue or my system's fault. |
|
See #24714 (comment) for the gcc-8 and gcc-9 bug |
|
Post-merge ACK |
w0xlt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Post-merge ACK


No description provided.