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