aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-02-02 17:57:01 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-02-02 18:25:33 +0100
commit85123be78df5a4e9447e70f9ee727416d45843d7 (patch)
tree8fbf7dd659fc4f77555120fd81d347cdce6a2b82 /src
parent4cad91663df381d0dff8526f3b4aa74569dfb626 (diff)
parent7444149de37a0cce9b28ca92f0af16cac8689873 (diff)
Merge #12317: Document method for reviewers to verify chainTxData
7444149 Document method for reviewers to verify chainTxData (John Newbery) Pull request description: This commit adds the final block hash of the window to getchaintxstats and documents how reviewers can verify changes to chainTxData. Tree-SHA512: d16abb5f47d058e52660f4d495f1e453205b1b83716d7c810ff62a70338db721386c1808ec1fc8468f514e4d80cc58e3c96eeb3184cbbcb1d07830fa5e53f342
Diffstat (limited to 'src')
-rw-r--r--src/rpc/blockchain.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 346672e45a..4276ad9eeb 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -1526,12 +1526,13 @@ UniValue getchaintxstats(const JSONRPCRequest& request)
"2. \"blockhash\" (string, optional) The hash of the block that ends the window.\n"
"\nResult:\n"
"{\n"
- " \"time\": xxxxx, (numeric) The timestamp for the final block in the window in UNIX format.\n"
- " \"txcount\": xxxxx, (numeric) The total number of transactions in the chain up to that point.\n"
- " \"window_block_count\": xxxxx, (numeric) Size of the window in number of blocks.\n"
- " \"window_tx_count\": xxxxx, (numeric) The number of transactions in the window. Only returned if \"window_block_count\" is > 0.\n"
- " \"window_interval\": xxxxx, (numeric) The elapsed time in the window in seconds. Only returned if \"window_block_count\" is > 0.\n"
- " \"txrate\": x.xx, (numeric) The average rate of transactions per second in the window. Only returned if \"window_interval\" is > 0.\n"
+ " \"time\": xxxxx, (numeric) The timestamp for the final block in the window in UNIX format.\n"
+ " \"txcount\": xxxxx, (numeric) The total number of transactions in the chain up to that point.\n"
+ " \"window_final_block_hash\": \"...\", (string) The hash of the final block in the window.\n"
+ " \"window_block_count\": xxxxx, (numeric) Size of the window in number of blocks.\n"
+ " \"window_tx_count\": xxxxx, (numeric) The number of transactions in the window. Only returned if \"window_block_count\" is > 0.\n"
+ " \"window_interval\": xxxxx, (numeric) The elapsed time in the window in seconds. Only returned if \"window_block_count\" is > 0.\n"
+ " \"txrate\": x.xx, (numeric) The average rate of transactions per second in the window. Only returned if \"window_interval\" is > 0.\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getchaintxstats", "")
@@ -1582,6 +1583,7 @@ UniValue getchaintxstats(const JSONRPCRequest& request)
UniValue ret(UniValue::VOBJ);
ret.push_back(Pair("time", (int64_t)pindex->nTime));
ret.push_back(Pair("txcount", (int64_t)pindex->nChainTx));
+ ret.push_back(Pair("window_final_block_hash", pindex->GetBlockHash().GetHex()));
ret.push_back(Pair("window_block_count", blockcount));
if (blockcount > 0) {
ret.push_back(Pair("window_tx_count", nTxDiff));