No description provided.
doc: Use DecodeTxDoc helper #24721
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2203-doc-rpc-raw-tx-🚁 changing 1 files +57 −93-
MarcoFalke commented at 9:46 AM on March 31, 2022: member
-
fa58427aae
doc: Use DecodeTxDoc helper
Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
-
MarcoFalke commented at 9:51 AM on March 31, 2022: member
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: - MarcoFalke added the label Refactoring on Mar 31, 2022
- MarcoFalke added the label Docs on Mar 31, 2022
- fanquake approved
-
fanquake commented at 11:42 AM on March 31, 2022: member
ACK fa58427aaea10b48ced069db20a58157a38ce9f9
- shaavan approved
-
shaavan commented at 1:43 PM on March 31, 2022: contributor
ACK fa58427aaea10b48ced069db20a58157a38ce9f9
- 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.
Screenshot:

-
shaavan commented at 1:49 PM on March 31, 2022: contributor
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.
-
MarcoFalke commented at 1:55 PM on March 31, 2022: member
See #24714 (comment) for the gcc-8 and gcc-9 bug
- MarcoFalke merged this on Mar 31, 2022
- MarcoFalke closed this on Mar 31, 2022
- MarcoFalke deleted the branch on Mar 31, 2022
-
laanwj commented at 2:02 PM on March 31, 2022: member
Post-merge ACK
-
w0xlt commented at 2:29 PM on March 31, 2022: contributor
Post-merge ACK
- sidhujag referenced this in commit 1711272ca1 on Apr 3, 2022
- DrahtBot locked this on Mar 31, 2023
Contributors
Labels