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.
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-
nervana21 commented at 3:00 PM on February 28, 2026: contributor
- DrahtBot added the label Docs on Feb 28, 2026
-
DrahtBot commented at 3:00 PM on February 28, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK instagibbs, w0xlt, mercie-ux, luke-jr, satsfy If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #34764 (rpc: replace ELISION references with explicit result fields by satsfy)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
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.
-
maflcko commented at 3:32 PM on February 28, 2026: member
The check may be skipped due to
RPCResult::Type::ELISION?static std::optional<UniValue::VType> ExpectedType(RPCResult::Type type) { using Type = RPCResult::Type; switch (type) { case Type::ELISION: case Type::ANY: { return std::nullopt; } ... -
f580cc7e9f
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.
- nervana21 force-pushed on Mar 1, 2026
-
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:
So I think only the documentation needs to be updated. Is there anything else that should be considered?
- instagibbs approved
-
instagibbs commented at 2:25 PM on March 2, 2026: member
ACK f580cc7e9f26331f7f03a8bbc5722521eb159bb2
-
w0xlt commented at 7:13 PM on March 2, 2026: contributor
ACK f580cc7e9f26331f7f03a8bbc5722521eb159bb2
-
mercie-ux commented at 7:41 PM on March 2, 2026: none
- luke-jr approved
-
luke-jr commented at 6:27 PM on March 7, 2026: member
ACK f580cc7e9f26331f7f03a8bbc5722521eb159bb2
-
satsfy commented at 3:15 AM on March 8, 2026: none
ACK https://github.com/bitcoin/bitcoin/commit/f580cc7e9f26331f7f03a8bbc5722521eb159bb2
I wonder why it was not there. If at some point in time it was not optional.
- fanquake added the label Needs backport (30.x) on Mar 8, 2026
- fanquake merged this on Mar 8, 2026
- fanquake closed this on Mar 8, 2026
- fanquake referenced this in commit 83ee4e5aa8 on Mar 8, 2026
- fanquake removed the label Needs backport (30.x) on Mar 8, 2026
- nervana21 deleted the branch on Mar 9, 2026