Skip to content

Commit c2caa0f

Browse files
committed
Merge bitcoin#21311: rpc: document optional fields for getchaintxstats result
73e1f7d 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: ACK 73e1f7d Tree-SHA512: 63c8db3e47a3c2d5564d53c564484b95b656e1e5deca1e9841bc90d122d3c81f02fd2b59313fd913ce81b16f7cc2969fe1dd9d6c3e23628b8ac057ea08f55daa
2 parents 2b2ab9a + 73e1f7d commit c2caa0f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rpc/blockchain.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,9 +1669,9 @@ static RPCHelpMan getchaintxstats()
16691669
{RPCResult::Type::STR_HEX, "window_final_block_hash", "The hash of the final block in the window"},
16701670
{RPCResult::Type::NUM, "window_final_block_height", "The height of the final block in the window."},
16711671
{RPCResult::Type::NUM, "window_block_count", "Size of the window in number of blocks"},
1672-
{RPCResult::Type::NUM, "window_tx_count", "The number of transactions in the window. Only returned if \"window_block_count\" is > 0"},
1673-
{RPCResult::Type::NUM, "window_interval", "The elapsed time in the window in seconds. Only returned if \"window_block_count\" is > 0"},
1674-
{RPCResult::Type::NUM, "txrate", "The average rate of transactions per second in the window. Only returned if \"window_interval\" is > 0"},
1672+
{RPCResult::Type::NUM, "window_tx_count", /* optional */ true, "The number of transactions in the window. Only returned if \"window_block_count\" is > 0"},
1673+
{RPCResult::Type::NUM, "window_interval", /* optional */ true, "The elapsed time in the window in seconds. Only returned if \"window_block_count\" is > 0"},
1674+
{RPCResult::Type::NUM, "txrate", /* optional */ true, "The average rate of transactions per second in the window. Only returned if \"window_interval\" is > 0"},
16751675
}},
16761676
RPCExamples{
16771677
HelpExampleCli("getchaintxstats", "")

0 commit comments

Comments
 (0)