Skip to content

Commit 928c681

Browse files
committed
Use "replaceable" instead of "optintorbf" in createrawtransaction.
To be consistent with other places (and add the missing named args entry for it).
1 parent 90a002e commit 928c681

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/rpc/client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
8686
{ "createrawtransaction", 0, "inputs" },
8787
{ "createrawtransaction", 1, "outputs" },
8888
{ "createrawtransaction", 2, "locktime" },
89-
{ "createrawtransaction", 3, "optintorbf" },
89+
{ "createrawtransaction", 3, "replaceable" },
9090
{ "signrawtransaction", 1, "prevtxs" },
9191
{ "signrawtransaction", 2, "privkeys" },
9292
{ "sendrawtransaction", 1, "allowhighfees" },

src/rpc/rawtransaction.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ UniValue createrawtransaction(const JSONRPCRequest& request)
294294
{
295295
if (request.fHelp || request.params.size() < 2 || request.params.size() > 4)
296296
throw std::runtime_error(
297-
"createrawtransaction [{\"txid\":\"id\",\"vout\":n},...] {\"address\":amount,\"data\":\"hex\",...} ( locktime ) ( optintorbf )\n"
297+
"createrawtransaction [{\"txid\":\"id\",\"vout\":n},...] {\"address\":amount,\"data\":\"hex\",...} ( locktime ) ( replaceable )\n"
298298
"\nCreate a transaction spending the given inputs and creating new outputs.\n"
299299
"Outputs can be addresses or data.\n"
300300
"Returns hex-encoded raw transaction.\n"
@@ -318,7 +318,8 @@ UniValue createrawtransaction(const JSONRPCRequest& request)
318318
" ,...\n"
319319
" }\n"
320320
"3. locktime (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs\n"
321-
"4. optintorbf (boolean, optional, default=false) Allow this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.\n"
321+
"4. replaceable (boolean, optional, default=false) Marks this transaction as BIP125 replaceable.\n"
322+
" Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.\n"
322323
"\nResult:\n"
323324
"\"transaction\" (string) hex string of the transaction\n"
324325

@@ -412,7 +413,7 @@ UniValue createrawtransaction(const JSONRPCRequest& request)
412413
}
413414

414415
if (request.params.size() > 3 && rbfOptIn != SignalsOptInRBF(rawTx)) {
415-
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter combination: Sequence number(s) contradict optintorbf option");
416+
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter combination: Sequence number(s) contradict replaceable option");
416417
}
417418

418419
return EncodeHexTx(rawTx);
@@ -900,7 +901,7 @@ static const CRPCCommand commands[] =
900901
{ // category name actor (function) okSafeMode
901902
// --------------------- ------------------------ ----------------------- ----------
902903
{ "rawtransactions", "getrawtransaction", &getrawtransaction, true, {"txid","verbose"} },
903-
{ "rawtransactions", "createrawtransaction", &createrawtransaction, true, {"inputs","outputs","locktime"} },
904+
{ "rawtransactions", "createrawtransaction", &createrawtransaction, true, {"inputs","outputs","locktime","replaceable"} },
904905
{ "rawtransactions", "decoderawtransaction", &decoderawtransaction, true, {"hexstring"} },
905906
{ "rawtransactions", "decodescript", &decodescript, true, {"hexstring"} },
906907
{ "rawtransactions", "sendrawtransaction", &sendrawtransaction, false, {"hexstring","allowhighfees"} },

0 commit comments

Comments
 (0)