@@ -67,12 +67,11 @@ static UniValue getrawtransaction(const JSONRPCRequest& request)
6767 if (request.fHelp || request.params .size () < 1 || request.params .size () > 3 )
6868 throw std::runtime_error (
6969 RPCHelpMan{" getrawtransaction" ,
70- " \n NOTE: By default this function only works for mempool transactions. If the -txindex option is\n "
71- " enabled, it also works for blockchain transactions. If the block which contains the transaction\n "
72- " is known, its hash can be provided even for nodes without -txindex. Note that if a blockhash is\n "
73- " provided, only that block will be searched and if the transaction is in the mempool or other\n "
74- " blocks, or if this node does not have the given block available, the transaction will not be found.\n "
75- " DEPRECATED: for now, it also works for transactions with unspent outputs.\n "
70+ " \n By default this function only works for mempool transactions. When called with a blockhash\n "
71+ " argument, getrawtransaction will return the transaction if the specified block is available and\n "
72+ " the transaction is found in that block. When called without a blockhash argument, getrawtransaction\n "
73+ " will return the transaction if it is in the mempool, or if -txindex is enabled and the transaction\n "
74+ " is in a block in the blockchain.\n "
7675
7776 " \n Return the raw transaction data.\n "
7877 " \n If verbose is 'true', returns an Object with information about 'txid'.\n "
@@ -175,7 +174,7 @@ static UniValue getrawtransaction(const JSONRPCRequest& request)
175174
176175 CTransactionRef tx;
177176 uint256 hash_block;
178- if (!GetTransaction (hash, tx, Params ().GetConsensus (), hash_block, true , blockindex)) {
177+ if (!GetTransaction (hash, tx, Params ().GetConsensus (), hash_block, blockindex)) {
179178 std::string errmsg;
180179 if (blockindex) {
181180 if (!(blockindex->nStatus & BLOCK_HAVE_DATA)) {
@@ -270,7 +269,7 @@ static UniValue gettxoutproof(const JSONRPCRequest& request)
270269 if (pblockindex == nullptr )
271270 {
272271 CTransactionRef tx;
273- if (!GetTransaction (oneTxid, tx, Params ().GetConsensus (), hashBlock, false ) || hashBlock.IsNull ())
272+ if (!GetTransaction (oneTxid, tx, Params ().GetConsensus (), hashBlock) || hashBlock.IsNull ())
274273 throw JSONRPCError (RPC_INVALID_ADDRESS_OR_KEY, " Transaction not yet in block" );
275274 pblockindex = LookupBlockIndex (hashBlock);
276275 if (!pblockindex) {
0 commit comments