Skip to content

Commit b8ea120

Browse files
author
Antoine Riard
committed
Add missing fields in some rpc wallets helps
Fields involvesWatchonly, generated, walletconflicts were missing in result description of listtransactions, listsinceblock, gettransactions
1 parent 52b9797 commit b8ea120

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/wallet/rpcwallet.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,7 @@ UniValue listtransactions(const JSONRPCRequest& request)
13811381
RPCResult{
13821382
"[\n"
13831383
" {\n"
1384+
" \"involvesWatchonly\": xxx, (bool) Only returned if imported addresses were involved in transaction\n"
13841385
" \"address\":\"address\", (string) The bitcoin address of the transaction.\n"
13851386
" \"category\": (string) The transaction category.\n"
13861387
" \"send\" Transactions sent.\n"
@@ -1396,11 +1397,13 @@ UniValue listtransactions(const JSONRPCRequest& request)
13961397
" 'send' category of transactions.\n"
13971398
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Negative confirmations indicate the\n"
13981399
" transaction conflicts with the block chain\n"
1400+
" \"generated\": xxx, (bool) Only returns true if transaction is a coinbase one\n"
13991401
" \"trusted\": xxx, (bool) Whether we consider the outputs of this unconfirmed transaction safe to spend.\n"
14001402
" \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction.\n"
14011403
" \"blockindex\": n, (numeric) The index of the transaction in the block that includes it.\n"
14021404
" \"blocktime\": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n"
14031405
" \"txid\": \"transactionid\", (string) The transaction id.\n"
1406+
" \"walletconflicts:\"hashvalue\", (array) List of txid with which this transaction is conflicting.\n"
14041407
" \"time\": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).\n"
14051408
" \"timereceived\": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT).\n"
14061409
" \"comment\": \"...\", (string) If a comment is associated with the transaction.\n"
@@ -1515,6 +1518,7 @@ static UniValue listsinceblock(const JSONRPCRequest& request)
15151518
RPCResult{
15161519
"{\n"
15171520
" \"transactions\": [\n"
1521+
" \"involvesWatchonly\": xxx, (bool) Only returned if imported addresses were involved in transaction\n"
15181522
" \"address\":\"address\", (string) The bitcoin address of the transaction.\n"
15191523
" \"category\": (string) The transaction category.\n"
15201524
" \"send\" Transactions sent.\n"
@@ -1528,10 +1532,12 @@ static UniValue listsinceblock(const JSONRPCRequest& request)
15281532
" \"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"
15291533
" \"confirmations\": n, (numeric) The number of confirmations for the transaction.\n"
15301534
" When it's < 0, it means the transaction conflicted that many blocks ago.\n"
1535+
" \"generated\": xxx, (bool) Only returns true if transaction is a coinbase one\n"
15311536
" \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction.\n"
15321537
" \"blockindex\": n, (numeric) The index of the transaction in the block that includes it.\n"
15331538
" \"blocktime\": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n"
15341539
" \"txid\": \"transactionid\", (string) The transaction id.\n"
1540+
" \"walletconflicts:\"hashvalue\", (array) List of txid with which this transaction is conflicting.\n"
15351541
" \"time\": xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).\n"
15361542
" \"timereceived\": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT).\n"
15371543
" \"bip125-replaceable\": \"yes|no|unknown\", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n"
@@ -1656,16 +1662,19 @@ static UniValue gettransaction(const JSONRPCRequest& request)
16561662
" \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the \n"
16571663
" 'send' category of transactions.\n"
16581664
" \"confirmations\" : n, (numeric) The number of confirmations\n"
1665+
" \"generated\": xxx, (bool) Only returns true if transaction is a coinbase one\n"
16591666
" \"blockhash\" : \"hash\", (string) The block hash\n"
16601667
" \"blockindex\" : xx, (numeric) The index of the transaction in the block that includes it\n"
16611668
" \"blocktime\" : ttt, (numeric) The time in seconds since epoch (1 Jan 1970 GMT)\n"
16621669
" \"txid\" : \"transactionid\", (string) The transaction id.\n"
1670+
" \"walletconflicts:\"hashvalue\", (array) List of txid with which this transaction is conflicting.\n"
16631671
" \"time\" : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)\n"
16641672
" \"timereceived\" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)\n"
16651673
" \"bip125-replaceable\": \"yes|no|unknown\", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n"
16661674
" may be unknown for unconfirmed transactions not in the mempool\n"
16671675
" \"details\" : [\n"
16681676
" {\n"
1677+
" \"involvesWatchonly\": xxx, (bool) Only returned if imported addresses were involved in transaction\n"
16691678
" \"address\" : \"address\", (string) The bitcoin address involved in the transaction\n"
16701679
" \"category\" : (string) The transaction category.\n"
16711680
" \"send\" Transactions sent.\n"

0 commit comments

Comments
 (0)