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.
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.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
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 <!–meta-tag:bot-skip–> into the comment that the bot should ignore.
Reviewers, this pull request conflicts with the following ones:
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.
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...
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.
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?
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.