doc: Fix fee field in getblock RPC result#34702
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, 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. |
|
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. |
|
The check may be skipped due to static std::optional<UniValue::VType> ExpectedType(RPCResult::Type type)
{
using Type = RPCResult::Type;
switch (type) {
case Type::ELISION:
case Type::ANY: {
return std::nullopt;
}
... |
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.
3186847 to
f580cc7
Compare
This behavior is already covered by a functional test: bitcoin/test/functional/rpc_blockchain.py Lines 766 to 767 in 744d47f So I think only the documentation needs to be updated. Is there anything else that should be considered? |
|
ACK f580cc7 |
|
ACK f580cc7 I wonder why it was not there. If at some point in time it was not optional. |
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. Github-Pull: bitcoin#34702 Rebased-From: f580cc7
|
Backported to 30.x in #34689. |
IIUC, when this line of code was originally added, |
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. Github-Pull: bitcoin#34702 Rebased-From: f580cc7
49a777d doc: update release notes for v30.x (fanquake) 0f9e08f doc: update build guides pre v31 (fanquake) 597ac36 doc: Fix `fee` field in `getblock` RPC result (nervana21) 47ed306 depends: Allow building Qt packages after interruption (Hennadii Stepanov) d221d1c psbt: validate pubkeys in MuSig2 pubnonce/partial sig deserialization (tboy1337) e1210ac doc: Improve dependencies.md IPC documentation (Ryan Ofsky) c17a5cd test: Add missing timeout_factor to zmq socket (MarcoFalke) 3042509 netif: fix compilation warning in QueryDefaultGatewayImpl() (MarcoFalke) 475a5b0 refactor: Use static_cast<decltype(...)> to suppress integer sanitizer warning (MarcoFalke) 7220ee3 util: Fix UB in SetStdinEcho when ENOTTY (MarcoFalke) Pull request description: Backports: * #34093 * #34219 * #34597 * #34690 * #34702 * #34706 * #34713 * #34789 ACKs for top commit: marcofleon: ACK 49a777d Tree-SHA512: b4ce54860b7306b22de75bb093ad574110875253e4ea3ca96a736809c8291dea1144a617c8791f36618d8e367022709ba5cf84ca0e450ef6d76394ab80f22e2f
The
feefield in thegetblockRPC result (verbosity 2 and 3) may be omitted when block undo data is not available. Marking it optional in theRPCResultaligns the documented schema with the runtime behavior.