Skip to content

Commit 6b824c0

Browse files
author
MarcoFalke
committed
Merge #13184: RPC Docs: gettxout*: clarify bestblock and unspent counts
f30e9be RPC Docs: gettxout*: clarify bestblock and unspent counts (David A. Harding) Pull request description: Expounds on two things I've seen confuse inexperienced users: - transactions/outputs in `gettxoutsetinfo`: a user thought this was the total number of transactions or outputs ever seen on the chain, whereas it's only the number in the UTXO. - bestblock in `gettxout`: a user thought this was the block that included the output, not realizing it was the tip of the current best block chain. I also copied this text to `gettxoutsetinfo` for congruency. I skimmed other uses of "bestblock" in the RPC docs and they seemed clear to me. Tree-SHA512: c2161c497bef5fe15ee9f1e2a4413fa099b5baa36205ba1ba4b3822885b3ccd1badb9c118a0334f47ba6fa7fff5818ac359cfac6a1108c6847a876b1a251bb7c
2 parents bf9b03d + f30e9be commit 6b824c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/rpc/blockchain.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -958,9 +958,9 @@ static UniValue gettxoutsetinfo(const JSONRPCRequest& request)
958958
"\nResult:\n"
959959
"{\n"
960960
" \"height\":n, (numeric) The current block height (index)\n"
961-
" \"bestblock\": \"hex\", (string) the best block hash hex\n"
962-
" \"transactions\": n, (numeric) The number of transactions\n"
963-
" \"txouts\": n, (numeric) The number of output transactions\n"
961+
" \"bestblock\": \"hex\", (string) The hash of the block at the tip of the chain\n"
962+
" \"transactions\": n, (numeric) The number of transactions with unspent outputs\n"
963+
" \"txouts\": n, (numeric) The number of unspent transaction outputs\n"
964964
" \"bogosize\": n, (numeric) A meaningless metric for UTXO set size\n"
965965
" \"hash_serialized_2\": \"hash\", (string) The serialized hash\n"
966966
" \"disk_size\": n, (numeric) The estimated size of the chainstate on disk\n"
@@ -1003,7 +1003,7 @@ UniValue gettxout(const JSONRPCRequest& request)
10031003
" Note that an unspent output that is spent in the mempool won't appear.\n"
10041004
"\nResult:\n"
10051005
"{\n"
1006-
" \"bestblock\" : \"hash\", (string) the block hash\n"
1006+
" \"bestblock\": \"hash\", (string) The hash of the block at the tip of the chain\n"
10071007
" \"confirmations\" : n, (numeric) The number of confirmations\n"
10081008
" \"value\" : x.xxx, (numeric) The transaction value in " + CURRENCY_UNIT + "\n"
10091009
" \"scriptPubKey\" : { (json object)\n"

0 commit comments

Comments
 (0)