mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-25 00:31:09 +02:00
Merge #21311: rpc: document optional fields for getchaintxstats result
73e1f7d754
rpc: document optional fields for getchaintxstats result (Sebastian Falbesoner) Pull request description: This mini-PR updates the result help of the `getchaintxstats` RPC by showing the following fields as "optional": - window_tx_count - window_interval - txrate Help output diff between master and PR branch: ```diff 16,18c16,18 < "window_tx_count" : n, (numeric) The number of transactions in the window. Only returned if "window_block_count" is > 0 < "window_interval" : n, (numeric) The elapsed time in the window in seconds. Only returned if "window_block_count" is > 0 < "txrate" : n (numeric) The average rate of transactions per second in the window. Only returned if "window_interval" is > 0 --- > "window_tx_count" : n, (numeric, optional) The number of transactions in the window. Only returned if "window_block_count" is > 0 > "window_interval" : n, (numeric, optional) The elapsed time in the window in seconds. Only returned if "window_block_count" is > 0 > "txrate" : n (numeric, optional) The average rate of transactions per second in the window. Only returned if "window_interval" is > 0 ``` ACKs for top commit: 0xB10C: ACK73e1f7d754
Tree-SHA512: 63c8db3e47a3c2d5564d53c564484b95b656e1e5deca1e9841bc90d122d3c81f02fd2b59313fd913ce81b16f7cc2969fe1dd9d6c3e23628b8ac057ea08f55daa
This commit is contained in:
@@ -1669,9 +1669,9 @@ static RPCHelpMan getchaintxstats()
|
||||
{RPCResult::Type::STR_HEX, "window_final_block_hash", "The hash of the final block in the window"},
|
||||
{RPCResult::Type::NUM, "window_final_block_height", "The height of the final block in the window."},
|
||||
{RPCResult::Type::NUM, "window_block_count", "Size of the window in number of blocks"},
|
||||
{RPCResult::Type::NUM, "window_tx_count", "The number of transactions in the window. Only returned if \"window_block_count\" is > 0"},
|
||||
{RPCResult::Type::NUM, "window_interval", "The elapsed time in the window in seconds. Only returned if \"window_block_count\" is > 0"},
|
||||
{RPCResult::Type::NUM, "txrate", "The average rate of transactions per second in the window. Only returned if \"window_interval\" is > 0"},
|
||||
{RPCResult::Type::NUM, "window_tx_count", /* optional */ true, "The number of transactions in the window. Only returned if \"window_block_count\" is > 0"},
|
||||
{RPCResult::Type::NUM, "window_interval", /* optional */ true, "The elapsed time in the window in seconds. Only returned if \"window_block_count\" is > 0"},
|
||||
{RPCResult::Type::NUM, "txrate", /* optional */ true, "The average rate of transactions per second in the window. Only returned if \"window_interval\" is > 0"},
|
||||
}},
|
||||
RPCExamples{
|
||||
HelpExampleCli("getchaintxstats", "")
|
||||
|
Reference in New Issue
Block a user