Skip to content

Commit

Permalink
doc: Remove duplicate "comment" from listsinceblock RPC help
Browse files Browse the repository at this point in the history
Also, properly document all (json object) and (json array)
  • Loading branch information
MarcoFalke committed Jan 23, 2020
1 parent fa04cd6 commit fab6311
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/wallet/rpcwallet.cpp
Expand Up @@ -1383,7 +1383,7 @@ static const std::string TransactionDescriptionString()
" \"time\": xxx, (numeric) The transaction time expressed in " + UNIX_EPOCH_TIME + ".\n"
" \"timereceived\": xxx, (numeric) The time received expressed in " + UNIX_EPOCH_TIME + ".\n"
" \"comment\": \"...\", (string) If a comment is associated with the transaction, only present if not empty.\n"
" \"bip125-replaceable\": \"yes|no|unknown\", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n"
" \"bip125-replaceable\" : \"str\", (string) (\"yes|no|unknown\") Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n"
" may be unknown for unconfirmed transactions not in the mempool\n";
}

Expand Down Expand Up @@ -1531,11 +1531,12 @@ static UniValue listsinceblock(const JSONRPCRequest& request)
" (not guaranteed to work on pruned nodes)"},
},
RPCResult{
"{\n"
" \"transactions\": [\n"
"{ (json object)\n"
" \"transactions\" : [ (json array)\n"
" { (json object)\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"
" \"address\" : \"str\", (string) The bitcoin address of the transaction.\n"
" \"category\" : \"str\", (string) The transaction category.\n"
" \"send\" Transactions sent.\n"
" \"receive\" Non-coinbase transactions received.\n"
" \"generate\" Coinbase transactions received with more than 100 confirmations.\n"
Expand All @@ -1547,15 +1548,16 @@ static UniValue listsinceblock(const JSONRPCRequest& request)
" \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the 'send' category of transactions.\n"
+ TransactionDescriptionString()
+ " \"abandoned\": xxx, (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.\n"
" \"comment\": \"...\", (string) If a comment is associated with the transaction.\n"
" \"label\" : \"label\" (string) A comment for the address/transaction, if any\n"
" \"to\": \"...\", (string) If a comment to is associated with the transaction.\n"
" },\n"
" ...\n"
" ],\n"
" \"removed\": [\n"
" \"removed\": [ (json array)\n"
" <structure is the same as \"transactions\" above, only present if include_removed=true>\n"
" Note: transactions that were re-added in the active chain will appear as-is in this array, and may thus have a positive confirmation count.\n"
" ],\n"
" \"lastblock\": \"lastblockhash\" (string) The hash of the block (target_confirmations-1) from the best block on the main chain. This is typically used to feed back into listsinceblock the next time you call it. So you would generally use a target_confirmations of say 6, so you will be continually re-notified of transactions until they've reached 6 confirmations plus any new ones\n"
" \"lastblock\": \"hex\" (string) The hash of the block (target_confirmations-1) from the best block on the main chain. This is typically used to feed back into listsinceblock the next time you call it. So you would generally use a target_confirmations of say 6, so you will be continually re-notified of transactions until they've reached 6 confirmations plus any new ones\n"
"}\n"
},
RPCExamples{
Expand Down

0 comments on commit fab6311

Please sign in to comment.