Use "replaceable" instead of "optintorbf" in createrawtransaction.
To be consistent with other places (and add the missing named args entry for it).
This commit is contained in:
parent
90a002ea64
commit
928c6811f2
2 changed files with 6 additions and 5 deletions
|
@ -86,7 +86,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
|
||||||
{ "createrawtransaction", 0, "inputs" },
|
{ "createrawtransaction", 0, "inputs" },
|
||||||
{ "createrawtransaction", 1, "outputs" },
|
{ "createrawtransaction", 1, "outputs" },
|
||||||
{ "createrawtransaction", 2, "locktime" },
|
{ "createrawtransaction", 2, "locktime" },
|
||||||
{ "createrawtransaction", 3, "optintorbf" },
|
{ "createrawtransaction", 3, "replaceable" },
|
||||||
{ "signrawtransaction", 1, "prevtxs" },
|
{ "signrawtransaction", 1, "prevtxs" },
|
||||||
{ "signrawtransaction", 2, "privkeys" },
|
{ "signrawtransaction", 2, "privkeys" },
|
||||||
{ "sendrawtransaction", 1, "allowhighfees" },
|
{ "sendrawtransaction", 1, "allowhighfees" },
|
||||||
|
|
|
@ -294,7 +294,7 @@ UniValue createrawtransaction(const JSONRPCRequest& request)
|
||||||
{
|
{
|
||||||
if (request.fHelp || request.params.size() < 2 || request.params.size() > 4)
|
if (request.fHelp || request.params.size() < 2 || request.params.size() > 4)
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
"createrawtransaction [{\"txid\":\"id\",\"vout\":n},...] {\"address\":amount,\"data\":\"hex\",...} ( locktime ) ( optintorbf )\n"
|
"createrawtransaction [{\"txid\":\"id\",\"vout\":n},...] {\"address\":amount,\"data\":\"hex\",...} ( locktime ) ( replaceable )\n"
|
||||||
"\nCreate a transaction spending the given inputs and creating new outputs.\n"
|
"\nCreate a transaction spending the given inputs and creating new outputs.\n"
|
||||||
"Outputs can be addresses or data.\n"
|
"Outputs can be addresses or data.\n"
|
||||||
"Returns hex-encoded raw transaction.\n"
|
"Returns hex-encoded raw transaction.\n"
|
||||||
|
@ -318,7 +318,8 @@ UniValue createrawtransaction(const JSONRPCRequest& request)
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
"3. locktime (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs\n"
|
"3. locktime (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs\n"
|
||||||
"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"
|
"4. replaceable (boolean, optional, default=false) Marks this transaction as BIP125 replaceable.\n"
|
||||||
|
" 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"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"\"transaction\" (string) hex string of the transaction\n"
|
"\"transaction\" (string) hex string of the transaction\n"
|
||||||
|
|
||||||
|
@ -412,7 +413,7 @@ UniValue createrawtransaction(const JSONRPCRequest& request)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.params.size() > 3 && rbfOptIn != SignalsOptInRBF(rawTx)) {
|
if (request.params.size() > 3 && rbfOptIn != SignalsOptInRBF(rawTx)) {
|
||||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter combination: Sequence number(s) contradict optintorbf option");
|
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter combination: Sequence number(s) contradict replaceable option");
|
||||||
}
|
}
|
||||||
|
|
||||||
return EncodeHexTx(rawTx);
|
return EncodeHexTx(rawTx);
|
||||||
|
@ -900,7 +901,7 @@ static const CRPCCommand commands[] =
|
||||||
{ // category name actor (function) okSafeMode
|
{ // category name actor (function) okSafeMode
|
||||||
// --------------------- ------------------------ ----------------------- ----------
|
// --------------------- ------------------------ ----------------------- ----------
|
||||||
{ "rawtransactions", "getrawtransaction", &getrawtransaction, true, {"txid","verbose"} },
|
{ "rawtransactions", "getrawtransaction", &getrawtransaction, true, {"txid","verbose"} },
|
||||||
{ "rawtransactions", "createrawtransaction", &createrawtransaction, true, {"inputs","outputs","locktime"} },
|
{ "rawtransactions", "createrawtransaction", &createrawtransaction, true, {"inputs","outputs","locktime","replaceable"} },
|
||||||
{ "rawtransactions", "decoderawtransaction", &decoderawtransaction, true, {"hexstring"} },
|
{ "rawtransactions", "decoderawtransaction", &decoderawtransaction, true, {"hexstring"} },
|
||||||
{ "rawtransactions", "decodescript", &decodescript, true, {"hexstring"} },
|
{ "rawtransactions", "decodescript", &decodescript, true, {"hexstring"} },
|
||||||
{ "rawtransactions", "sendrawtransaction", &sendrawtransaction, false, {"hexstring","allowhighfees"} },
|
{ "rawtransactions", "sendrawtransaction", &sendrawtransaction, false, {"hexstring","allowhighfees"} },
|
||||||
|
|
Loading…
Reference in a new issue