mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 12:22:50 -05:00
doc: rpc: improve getmininginfo
help text
- The reserved weight of the coinbase transaction is an estimate and may not reflect the exact value; it can be lower. - It should be clear that `currentblockweight` includes the reserved coinbase transaction weight. whereas `currentblocktx` does not account for the coinbase transaction count. - Also clarify `m_last_block_num_txs` and `m_last_block_weight`
This commit is contained in:
parent
c8acd4032d
commit
777434a2cd
2 changed files with 4 additions and 2 deletions
|
@ -176,7 +176,9 @@ public:
|
|||
/** Construct a new block template */
|
||||
std::unique_ptr<CBlockTemplate> CreateNewBlock();
|
||||
|
||||
/** The number of transactions in the last assembled block (excluding coinbase transaction) */
|
||||
inline static std::optional<int64_t> m_last_block_num_txs{};
|
||||
/** The weight of the last assembled block (including reserved weight for block header, txs count and coinbase tx) */
|
||||
inline static std::optional<int64_t> m_last_block_weight{};
|
||||
|
||||
private:
|
||||
|
|
|
@ -419,8 +419,8 @@ static RPCHelpMan getmininginfo()
|
|||
RPCResult::Type::OBJ, "", "",
|
||||
{
|
||||
{RPCResult::Type::NUM, "blocks", "The current block"},
|
||||
{RPCResult::Type::NUM, "currentblockweight", /*optional=*/true, "The block weight of the last assembled block (only present if a block was ever assembled)"},
|
||||
{RPCResult::Type::NUM, "currentblocktx", /*optional=*/true, "The number of block transactions of the last assembled block (only present if a block was ever assembled)"},
|
||||
{RPCResult::Type::NUM, "currentblockweight", /*optional=*/true, "The block weight (including reserved weight for block header, txs count and coinbase tx) of the last assembled block (only present if a block was ever assembled)"},
|
||||
{RPCResult::Type::NUM, "currentblocktx", /*optional=*/true, "The number of block transactions (excluding coinbase) of the last assembled block (only present if a block was ever assembled)"},
|
||||
{RPCResult::Type::STR_HEX, "bits", "The current nBits, compact representation of the block difficulty target"},
|
||||
{RPCResult::Type::NUM, "difficulty", "The current difficulty"},
|
||||
{RPCResult::Type::STR_HEX, "target", "The current target"},
|
||||
|
|
Loading…
Add table
Reference in a new issue