mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-29 05:53:21 +02:00
Add missing fields in TransactionDescriptionString and others
Fields involvesWatchonly, generated, walletconflicts were missing in result description of listtransactions, listsinceblock, gettransaction Align getttransaction fields which were odd compare to other rpc helpers
This commit is contained in:
@@ -1190,7 +1190,7 @@ static UniValue listreceivedbyaddress(const JSONRPCRequest& request)
|
||||
RPCResult{
|
||||
"[\n"
|
||||
" {\n"
|
||||
" \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n"
|
||||
" \"involvesWatchonly\" : true, (bool) Only returns true if imported addresses were involved in transaction.\n"
|
||||
" \"address\" : \"receivingaddress\", (string) The receiving address\n"
|
||||
" \"amount\" : x.xxx, (numeric) The total amount in " + CURRENCY_UNIT + " received by the address\n"
|
||||
" \"confirmations\" : n, (numeric) The number of confirmations of the most recent transaction included\n"
|
||||
@@ -1240,7 +1240,7 @@ static UniValue listreceivedbylabel(const JSONRPCRequest& request)
|
||||
RPCResult{
|
||||
"[\n"
|
||||
" {\n"
|
||||
" \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n"
|
||||
" \"involvesWatchonly\" : true, (bool) Only returns true if imported addresses were involved in transaction.\n"
|
||||
" \"amount\" : x.xxx, (numeric) The total amount received by addresses with this label\n"
|
||||
" \"confirmations\" : n, (numeric) The number of confirmations of the most recent transaction included\n"
|
||||
" \"label\" : \"label\" (string) The label of the receiving address. The default label is \"\".\n"
|
||||
@@ -1363,11 +1363,16 @@ static const std::string TransactionDescriptionString()
|
||||
{
|
||||
return " \"confirmations\": n, (numeric) The number of confirmations for the transaction. Negative confirmations means the\n"
|
||||
" transaction conflicted that many blocks ago.\n"
|
||||
" \"trusted\": xxx, (bool) Whether we consider the outputs of this unconfirmed transaction safe to spend.\n"
|
||||
" \"generated\": xxx, (bool) Only present if transaction only input is a coinbase one.\n"
|
||||
" \"trusted\": xxx, (bool) Only present if we consider transaction to be trusted and so safe to spend from.\n"
|
||||
" \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction.\n"
|
||||
" \"blockindex\": n, (numeric) The index of the transaction in the block that includes it.\n"
|
||||
" \"blocktime\": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n"
|
||||
" \"txid\": \"transactionid\", (string) The transaction id.\n"
|
||||
" \"walletconflicts\": [ (array) Conflicting transaction ids.\n"
|
||||
" \"txid\", (string) The transaction id.\n"
|
||||
" ...\n"
|
||||
" ],\n"
|
||||
" \"time\": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).\n"
|
||||
" \"timereceived\": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT).\n"
|
||||
" \"comment\": \"...\", (string) If a comment is associated with the transaction, only present if not empty.\n"
|
||||
@@ -1397,6 +1402,7 @@ UniValue listtransactions(const JSONRPCRequest& request)
|
||||
RPCResult{
|
||||
"[\n"
|
||||
" {\n"
|
||||
" \"involvesWatchonly\": xxx, (bool) Only returns true if imported addresses were involved in transaction.\n"
|
||||
" \"address\":\"address\", (string) The bitcoin address of the transaction.\n"
|
||||
" \"category\": (string) The transaction category.\n"
|
||||
" \"send\" Transactions sent.\n"
|
||||
@@ -1520,6 +1526,7 @@ static UniValue listsinceblock(const JSONRPCRequest& request)
|
||||
RPCResult{
|
||||
"{\n"
|
||||
" \"transactions\": [\n"
|
||||
" \"involvesWatchonly\": xxx, (bool) Only returns true if imported addresses were involved in transaction.\n"
|
||||
" \"address\":\"address\", (string) The bitcoin address of the transaction.\n"
|
||||
" \"category\": (string) The transaction category.\n"
|
||||
" \"send\" Transactions sent.\n"
|
||||
@@ -1657,6 +1664,7 @@ static UniValue gettransaction(const JSONRPCRequest& request)
|
||||
+ TransactionDescriptionString()
|
||||
+ " \"details\" : [\n"
|
||||
" {\n"
|
||||
" \"involvesWatchonly\": xxx, (bool) Only returns true if imported addresses were involved in transaction.\n"
|
||||
" \"address\" : \"address\", (string) The bitcoin address involved in the transaction\n"
|
||||
" \"category\" : (string) The transaction category.\n"
|
||||
" \"send\" Transactions sent.\n"
|
||||
|
Reference in New Issue
Block a user