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
This commit is contained in:
nervana21 2026-02-28 13:36:20 -05:00 committed by fanquake
parent 47ed306689
commit 597ac36285
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

View File

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