diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index cdb50af15d..9ecba4a8de 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -207,7 +207,7 @@ static UniValue getrawtransaction(const JSONRPCRequest& request) } errmsg = "No such transaction found in the provided block"; } else if (!g_txindex) { - errmsg = "No such mempool transaction. Use -txindex to enable blockchain transaction queries"; + errmsg = "No such mempool transaction. Use -txindex or provide a block hash to enable blockchain transaction queries"; } else if (!f_txindex_ready) { errmsg = "No such mempool transaction. Blockchain transactions are still in the process of being indexed"; } else { diff --git a/test/functional/feature_connect_genesis_outputs.py b/test/functional/feature_connect_genesis_outputs.py index ef97c76168..c20c84fc2b 100755 --- a/test/functional/feature_connect_genesis_outputs.py +++ b/test/functional/feature_connect_genesis_outputs.py @@ -52,11 +52,11 @@ class ConnectGenesisTest(BitcoinTestFramework): # Test rpc getraw functionality # Coinbase transaction is provably unspendable (OP_RETURN), so even AddCoin won't add it - assert_raises_rpc_error(-5, "No such mempool transaction. Use -txindex to enable blockchain transaction queries. Use gettransaction for wallet transactions.", self.nodes[0].getrawtransaction, coinbase_tx) - assert_raises_rpc_error(-5, "No such mempool transaction. Use -txindex to enable blockchain transaction queries. Use gettransaction for wallet transactions.", self.nodes[1].getrawtransaction, coinbase_tx) + assert_raises_rpc_error(-5, "No such mempool transaction. Use -txindex or provide a block hash to enable blockchain transaction queries. Use gettransaction for wallet transactions.", self.nodes[0].getrawtransaction, coinbase_tx) + assert_raises_rpc_error(-5, "No such mempool transaction. Use -txindex or provide a block hash to enable blockchain transaction queries. Use gettransaction for wallet transactions.", self.nodes[1].getrawtransaction, coinbase_tx) # Issuance transaction is an OP_TRUE, so will be available to second node - assert_raises_rpc_error(-5, "No such mempool transaction. Use -txindex to enable blockchain transaction queries. Use gettransaction for wallet transactions.", self.nodes[0].getrawtransaction, issuance_tx) + assert_raises_rpc_error(-5, "No such mempool transaction. Use -txindex or provide a block hash to enable blockchain transaction queries. Use gettransaction for wallet transactions.", self.nodes[0].getrawtransaction, issuance_tx) self.nodes[1].getrawtransaction(issuance_tx, False, self.nodes[0].getblockhash(0)) if __name__ == '__main__':