From 597ac362850fe6829bb3029aa5a180a998f6aa95 Mon Sep 17 00:00:00 2001 From: nervana21 <205626986+nervana21@users.noreply.github.com> Date: Sat, 28 Feb 2026 13:36:20 -0500 Subject: [PATCH] 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. Github-Pull: #34702 Rebased-From: f580cc7e9f26331f7f03a8bbc5722521eb159bb2 --- src/rpc/blockchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 4ef863a4805..a20affafee7 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -787,7 +787,7 @@ static RPCHelpMan getblock() {RPCResult::Type::OBJ, "", "", { {RPCResult::Type::ELISION, "", "The transactions in the format of the getrawtransaction RPC. Different from verbosity = 1 \"tx\" result"}, - {RPCResult::Type::NUM, "fee", "The transaction fee in " + CURRENCY_UNIT + ", omitted if block undo data is not available"}, + {RPCResult::Type::NUM, "fee", /*optional=*/true, "The transaction fee in " + CURRENCY_UNIT + ", omitted if block undo data is not available"}, }}, }}, }},