Skip to content

Commit baf125b

Browse files
author
MarcoFalke
committed
Merge #15332: [Docs] Small updates to getrawtransaction description
4701239 [Docs] Small updates to getrawtransaction description (Amiti Uttarwar) Pull request description: As per review comments on bitcoin/bitcoin#15159 Tree-SHA512: 0bbbe956b47d177f7e67c5ab2048287783327d9e07a679d64d79aee3ea8633e769f75b59d3dbce517924ba5d64d6c44f26bf49e16d40612463e460ad1a238129
2 parents 9e7f8f6 + 4701239 commit baf125b

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

doc/release-notes.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,11 @@ in the Low-level Changes section below.
254254

255255
- See the [Mining](#mining) section for changes to `getblocktemplate`.
256256

257-
- The `getrawtransaction` RPC no longer checks the unspent UTXO set for
258-
a transaction. The remaining behaviors are as follows: 1. If a
259-
blockhash is provided, check the corresponding block. 2. If no
260-
blockhash is provided, check the mempool. 3. If no blockhash is
261-
provided but txindex is enabled, also check txindex.
257+
- The `getrawtransaction` RPC & REST endpoints no longer check the
258+
unspent UTXO set for a transaction. The remaining behaviors are as
259+
follows: 1. If a blockhash is provided, check the corresponding block.
260+
2. If no blockhash is provided, check the mempool. 3. If no blockhash
261+
is provided but txindex is enabled, also check txindex.
262262

263263
Graphical User Interface (GUI)
264264
------------------------------

src/rpc/rawtransaction.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) 2010 Satoshi Nakamoto
2-
// Copyright (c) 2009-2018 The Bitcoin Core developers
2+
// Copyright (c) 2009-2019 The Bitcoin Core developers
33
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

@@ -66,17 +66,21 @@ static UniValue getrawtransaction(const JSONRPCRequest& request)
6666
{
6767
if (request.fHelp || request.params.size() < 1 || request.params.size() > 3)
6868
throw std::runtime_error(
69-
RPCHelpMan{"getrawtransaction",
69+
RPCHelpMan{
70+
"getrawtransaction",
71+
"\nReturn the raw transaction data.\n"
72+
7073
"\nBy default this function only works for mempool transactions. When called with a blockhash\n"
7174
"argument, getrawtransaction will return the transaction if the specified block is available and\n"
7275
"the transaction is found in that block. When called without a blockhash argument, getrawtransaction\n"
7376
"will return the transaction if it is in the mempool, or if -txindex is enabled and the transaction\n"
7477
"is in a block in the blockchain.\n"
7578

76-
"\nReturn the raw transaction data.\n"
77-
"\nIf verbose is 'true', returns an Object with information about 'txid'.\n"
78-
"If verbose is 'false' or omitted, returns a string that is serialized, hex-encoded data for 'txid'.\n"
79-
,
79+
"\nHint: use getmempoolentry to fetch a specific transaction from the mempool.\n"
80+
"Or use gettransaction for wallet transactions.\n"
81+
82+
"\nIf verbose is 'true', returns an Object with information about 'txid'.\n"
83+
"If verbose is 'false' or omitted, returns a string that is serialized, hex-encoded data for 'txid'.\n",
8084
{
8185
{"txid", RPCArg::Type::STR_HEX, /* opt */ false, /* default_val */ "", "The transaction id"},
8286
{"verbose", RPCArg::Type::BOOL, /* opt */ true, /* default_val */ "false", "If false, return a string, otherwise return a json object"},

0 commit comments

Comments
 (0)