refactor: Introduce TxDocOptions

This prepares the function to be more flexible, when more options are
passed in the future.
This commit is contained in:
MarcoFalke
2026-03-10 16:35:03 +01:00
parent fa8250e961
commit fa4d5891b9
4 changed files with 13 additions and 7 deletions

View File

@@ -248,7 +248,7 @@ static RPCHelpMan getrawtransaction()
{RPCResult::Type::NUM, "time", /*optional=*/true, "Same as \"blocktime\""},
{RPCResult::Type::STR_HEX, "hex", "The serialized, hex-encoded data for 'txid'"},
},
DecodeTxDoc(/*txid_field_doc=*/"The transaction id (same as provided)", /*wallet=*/false)),
TxDoc({.txid_field_doc="The transaction id (same as provided)"})),
},
RPCResult{"for verbosity = 2",
RPCResult::Type::OBJ, "", "",
@@ -422,7 +422,7 @@ static RPCHelpMan decoderawtransaction()
},
RPCResult{
RPCResult::Type::OBJ, "", "",
DecodeTxDoc(/*txid_field_doc=*/"The transaction id", /*wallet=*/false),
TxDoc(),
},
RPCExamples{
HelpExampleCli("decoderawtransaction", "\"hexstring\"")