doc: Fix fee field in getblock RPC result #34702

pull nervana21 wants to merge 1 commits into bitcoin:master from nervana21:2026-02-getblock-fee-optional changing 1 files +1 −1
  1. nervana21 commented at 3:00 pm on February 28, 2026: contributor
    The fee field in the getblock RPC result (verbosity 2 and 3) may be omitted when block undo data is not available. Marking it optional in the RPCResult aligns the documented schema with the runtime behavior.
  2. DrahtBot added the label Docs on Feb 28, 2026
  3. DrahtBot commented at 3:00 pm on February 28, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK instagibbs, w0xlt, mercie-ux

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  4. instagibbs commented at 3:18 pm on February 28, 2026: member
    I can’t recall, but would a functional test fail in master when it doesn’t end up existing in a response? If so, worth making a regression test.
  5. maflcko commented at 3:32 pm on February 28, 2026: member

    The check may be skipped due to RPCResult::Type::ELISION?

    0static std::optional<UniValue::VType> ExpectedType(RPCResult::Type type)
    1{
    2    using Type = RPCResult::Type;
    3    switch (type) {
    4    case Type::ELISION:
    5    case Type::ANY: {
    6        return std::nullopt;
    7    }
    8...
    
  6. doc: Fix `fee` field in `getblock` RPC result
    The `fee` field in the `getblock` RPC result (verbosity 2 and 3) may be
    omitted when block undo data is not available. Marking it optional in
    the `RPCResult` aligns the documented schema with the runtime behavior.
    f580cc7e9f
  7. nervana21 force-pushed on Mar 1, 2026
  8. nervana21 commented at 5:14 pm on March 1, 2026: contributor

    I can’t recall, but would a functional test fail in master when it doesn’t end up existing in a response? If so, worth making a regression test.

    This behavior is already covered by a functional test:

    https://github.com/bitcoin/bitcoin/blob/744d47fcee0d32a71154292699bfdecf954a6065/test/functional/rpc_blockchain.py#L766-L767

    So I think only the documentation needs to be updated. Is there anything else that should be considered?

  9. instagibbs approved
  10. instagibbs commented at 2:25 pm on March 2, 2026: member
    ACK f580cc7e9f26331f7f03a8bbc5722521eb159bb2
  11. w0xlt commented at 7:13 pm on March 2, 2026: contributor
    ACK f580cc7e9f26331f7f03a8bbc5722521eb159bb2

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-03-04 03:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me