From 931117a46f5854d487e13b2b1446b621409c8371 Mon Sep 17 00:00:00 2001 From: rkrux Date: Thu, 27 Feb 2025 17:42:28 +0530 Subject: [PATCH] rpc: update the doc for `data` field in `outputs` argument This affects docs of the following RPCs: `bumpfee`, `psbtbumpfee`, `send`, `walletcreatefundedpsbt`, `createpsbt`, and `createrawtransaction` It was not evident to me that this field creates an `OP_RETURN` output until I read the code and tried it out. Thus, making the doc explicitly mention it. --- src/rpc/rawtransaction.cpp | 2 +- src/wallet/rpc/spend.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 421656152cb..fd3aa0d14b8 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -150,7 +150,7 @@ static std::vector CreateTxDoc() }, {"", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "", { - {"data", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "A key-value pair. The key must be \"data\", the value is hex-encoded data"}, + {"data", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "A key-value pair. The key must be \"data\", the value is hex-encoded data that becomes a part of an OP_RETURN output"}, }, }, }, diff --git a/src/wallet/rpc/spend.cpp b/src/wallet/rpc/spend.cpp index 567ddfcba7b..595b5f523e4 100644 --- a/src/wallet/rpc/spend.cpp +++ b/src/wallet/rpc/spend.cpp @@ -978,7 +978,7 @@ static std::vector OutputsDoc() }, {"", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "", { - {"data", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "A key-value pair. The key must be \"data\", the value is hex-encoded data"}, + {"data", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "A key-value pair. The key must be \"data\", the value is hex-encoded data that becomes a part of an OP_RETURN output"}, }, }, };