Merge bitcoin/bitcoin#34702: doc: Fix fee field in getblock RPC result

f580cc7e9f26331f7f03a8bbc5722521eb159bb2 doc: Fix `fee` field in `getblock` RPC result (nervana21)

Pull request description:

  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.

ACKs for top commit:
  mercie-ux:
    ACK  f580cc7e9f
  satsfy:
    ACK f580cc7e9f
  instagibbs:
    ACK f580cc7e9f26331f7f03a8bbc5722521eb159bb2
  w0xlt:
    ACK f580cc7e9f26331f7f03a8bbc5722521eb159bb2
  luke-jr:
    ACK f580cc7e9f26331f7f03a8bbc5722521eb159bb2

Tree-SHA512: e3b44a48e17e21b906967aef124688a34aea2c6af3b6df3c47693fd3002d33e824f764c0060a7ab07751b98567c29eb16f3b3c07bf2999db080ff7adfd087dfd
This commit is contained in:
merge-script 2026-03-08 14:34:37 +00:00
commit 9833ef5f86
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

View File

@ -816,7 +816,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"},
}},
}},
}},