diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-02-05 17:18:18 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-02-05 17:18:40 -0500 |
commit | baf125b31d0b4d37fc54123bc2563dac9ffde024 (patch) | |
tree | 9c9b4f333ecdb5bd3bc274464a32691b93ed09d4 | |
parent | 9e7f8f6c827114141c038a1e6dee42c8c43ed522 (diff) | |
parent | 47012391ec25eb76669c7ba2aa458c3ac611289c (diff) | |
download | bitcoin-baf125b31d0b4d37fc54123bc2563dac9ffde024.tar.xz |
Merge #15332: [Docs] Small updates to getrawtransaction description
47012391ec [Docs] Small updates to getrawtransaction description (Amiti Uttarwar)
Pull request description:
As per review comments on https://github.com/bitcoin/bitcoin/pull/15159
Tree-SHA512: 0bbbe956b47d177f7e67c5ab2048287783327d9e07a679d64d79aee3ea8633e769f75b59d3dbce517924ba5d64d6c44f26bf49e16d40612463e460ad1a238129
-rw-r--r-- | doc/release-notes.md | 10 | ||||
-rw-r--r-- | src/rpc/rawtransaction.cpp | 16 |
2 files changed, 15 insertions, 11 deletions
diff --git a/doc/release-notes.md b/doc/release-notes.md index a54b08848f..c23a7f6e0a 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -254,11 +254,11 @@ in the Low-level Changes section below. - See the [Mining](#mining) section for changes to `getblocktemplate`. -- The `getrawtransaction` RPC no longer checks the unspent UTXO set for - a transaction. The remaining behaviors are as follows: 1. If a - blockhash is provided, check the corresponding block. 2. If no - blockhash is provided, check the mempool. 3. If no blockhash is - provided but txindex is enabled, also check txindex. +- The `getrawtransaction` RPC & REST endpoints no longer check the + unspent UTXO set for a transaction. The remaining behaviors are as + follows: 1. If a blockhash is provided, check the corresponding block. + 2. If no blockhash is provided, check the mempool. 3. If no blockhash + is provided but txindex is enabled, also check txindex. Graphical User Interface (GUI) ------------------------------ diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index ac2e0ff4ee..b3b9d8af09 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2010 Satoshi Nakamoto -// Copyright (c) 2009-2018 The Bitcoin Core developers +// Copyright (c) 2009-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -66,17 +66,21 @@ static UniValue getrawtransaction(const JSONRPCRequest& request) { if (request.fHelp || request.params.size() < 1 || request.params.size() > 3) throw std::runtime_error( - RPCHelpMan{"getrawtransaction", + RPCHelpMan{ + "getrawtransaction", + "\nReturn the raw transaction data.\n" + "\nBy default this function only works for mempool transactions. When called with a blockhash\n" "argument, getrawtransaction will return the transaction if the specified block is available and\n" "the transaction is found in that block. When called without a blockhash argument, getrawtransaction\n" "will return the transaction if it is in the mempool, or if -txindex is enabled and the transaction\n" "is in a block in the blockchain.\n" - "\nReturn the raw transaction data.\n" - "\nIf verbose is 'true', returns an Object with information about 'txid'.\n" - "If verbose is 'false' or omitted, returns a string that is serialized, hex-encoded data for 'txid'.\n" - , + "\nHint: use getmempoolentry to fetch a specific transaction from the mempool.\n" + "Or use gettransaction for wallet transactions.\n" + + "\nIf verbose is 'true', returns an Object with information about 'txid'.\n" + "If verbose is 'false' or omitted, returns a string that is serialized, hex-encoded data for 'txid'.\n", { {"txid", RPCArg::Type::STR_HEX, /* opt */ false, /* default_val */ "", "The transaction id"}, {"verbose", RPCArg::Type::BOOL, /* opt */ true, /* default_val */ "false", "If false, return a string, otherwise return a json object"}, |