walletcreatefundedpsbt: remove duplicate replaceable arg
This commit is contained in:
parent
2252ec5008
commit
1f18d7b591
2 changed files with 9 additions and 12 deletions
|
@ -113,9 +113,8 @@ static const CRPCConvertParam vRPCConvertParams[] =
|
||||||
{ "walletcreatefundedpsbt", 0, "inputs" },
|
{ "walletcreatefundedpsbt", 0, "inputs" },
|
||||||
{ "walletcreatefundedpsbt", 1, "outputs" },
|
{ "walletcreatefundedpsbt", 1, "outputs" },
|
||||||
{ "walletcreatefundedpsbt", 2, "locktime" },
|
{ "walletcreatefundedpsbt", 2, "locktime" },
|
||||||
{ "walletcreatefundedpsbt", 3, "replaceable" },
|
{ "walletcreatefundedpsbt", 3, "options" },
|
||||||
{ "walletcreatefundedpsbt", 4, "options" },
|
{ "walletcreatefundedpsbt", 4, "bip32derivs" },
|
||||||
{ "walletcreatefundedpsbt", 5, "bip32derivs" },
|
|
||||||
{ "walletprocesspsbt", 1, "sign" },
|
{ "walletprocesspsbt", 1, "sign" },
|
||||||
{ "walletprocesspsbt", 3, "bip32derivs" },
|
{ "walletprocesspsbt", 3, "bip32derivs" },
|
||||||
{ "createpsbt", 0, "inputs" },
|
{ "createpsbt", 0, "inputs" },
|
||||||
|
|
|
@ -4643,7 +4643,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.fHelp || request.params.size() < 2 || request.params.size() > 6)
|
if (request.fHelp || request.params.size() < 2 || request.params.size() > 5)
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
"walletcreatefundedpsbt [{\"txid\":\"id\",\"vout\":n},...] [{\"address\":amount},{\"data\":\"hex\"},...] ( locktime ) ( replaceable ) ( options bip32derivs )\n"
|
"walletcreatefundedpsbt [{\"txid\":\"id\",\"vout\":n},...] [{\"address\":amount},{\"data\":\"hex\"},...] ( locktime ) ( replaceable ) ( options bip32derivs )\n"
|
||||||
"\nCreates and funds a transaction in the Partially Signed Transaction format. Inputs will be added if supplied inputs are not enough\n"
|
"\nCreates and funds a transaction in the Partially Signed Transaction format. Inputs will be added if supplied inputs are not enough\n"
|
||||||
|
@ -4670,9 +4670,8 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
|
||||||
" accepted as second parameter.\n"
|
" accepted as second parameter.\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. 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"
|
" 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"
|
||||||
"5. options (object, optional)\n"
|
"4. options (object, optional)\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
" \"changeAddress\" (string, optional, default pool address) The bitcoin address to receive the change\n"
|
" \"changeAddress\" (string, optional, default pool address) The bitcoin address to receive the change\n"
|
||||||
" \"changePosition\" (numeric, optional, default random) The index of the change output\n"
|
" \"changePosition\" (numeric, optional, default random) The index of the change output\n"
|
||||||
|
@ -4694,7 +4693,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
|
||||||
" \"ECONOMICAL\"\n"
|
" \"ECONOMICAL\"\n"
|
||||||
" \"CONSERVATIVE\"\n"
|
" \"CONSERVATIVE\"\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
"6. bip32derivs (boolean, optiona, default=false) If true, includes the BIP 32 derivation paths for public keys if we know them\n"
|
"5. bip32derivs (boolean, optiona, default=false) If true, includes the BIP 32 derivation paths for public keys if we know them\n"
|
||||||
"\nResult:\n"
|
"\nResult:\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" \"psbt\": \"value\", (string) The resulting raw transaction (base64-encoded string)\n"
|
" \"psbt\": \"value\", (string) The resulting raw transaction (base64-encoded string)\n"
|
||||||
|
@ -4710,15 +4709,14 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
|
||||||
UniValue::VARR,
|
UniValue::VARR,
|
||||||
UniValueType(), // ARR or OBJ, checked later
|
UniValueType(), // ARR or OBJ, checked later
|
||||||
UniValue::VNUM,
|
UniValue::VNUM,
|
||||||
UniValue::VBOOL,
|
|
||||||
UniValue::VOBJ
|
UniValue::VOBJ
|
||||||
}, true
|
}, true
|
||||||
);
|
);
|
||||||
|
|
||||||
CAmount fee;
|
CAmount fee;
|
||||||
int change_position;
|
int change_position;
|
||||||
CMutableTransaction rawTx = ConstructTransaction(request.params[0], request.params[1], request.params[2], request.params[3]);
|
CMutableTransaction rawTx = ConstructTransaction(request.params[0], request.params[1], request.params[2], request.params[3]["replaceable"]);
|
||||||
FundTransaction(pwallet, rawTx, fee, change_position, request.params[4]);
|
FundTransaction(pwallet, rawTx, fee, change_position, request.params[3]);
|
||||||
|
|
||||||
// Make a blank psbt
|
// Make a blank psbt
|
||||||
PartiallySignedTransaction psbtx;
|
PartiallySignedTransaction psbtx;
|
||||||
|
@ -4735,7 +4733,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
|
||||||
const CTransaction txConst(*psbtx.tx);
|
const CTransaction txConst(*psbtx.tx);
|
||||||
|
|
||||||
// Fill transaction with out data but don't sign
|
// Fill transaction with out data but don't sign
|
||||||
bool bip32derivs = request.params[5].isNull() ? false : request.params[5].get_bool();
|
bool bip32derivs = request.params[4].isNull() ? false : request.params[5].get_bool();
|
||||||
FillPSBT(pwallet, psbtx, &txConst, 1, false, bip32derivs);
|
FillPSBT(pwallet, psbtx, &txConst, 1, false, bip32derivs);
|
||||||
|
|
||||||
// Serialize the PSBT
|
// Serialize the PSBT
|
||||||
|
@ -4765,7 +4763,7 @@ static const CRPCCommand commands[] =
|
||||||
// --------------------- ------------------------ ----------------------- ----------
|
// --------------------- ------------------------ ----------------------- ----------
|
||||||
{ "rawtransactions", "fundrawtransaction", &fundrawtransaction, {"hexstring","options","iswitness"} },
|
{ "rawtransactions", "fundrawtransaction", &fundrawtransaction, {"hexstring","options","iswitness"} },
|
||||||
{ "wallet", "walletprocesspsbt", &walletprocesspsbt, {"psbt","sign","sighashtype","bip32derivs"} },
|
{ "wallet", "walletprocesspsbt", &walletprocesspsbt, {"psbt","sign","sighashtype","bip32derivs"} },
|
||||||
{ "wallet", "walletcreatefundedpsbt", &walletcreatefundedpsbt, {"inputs","outputs","locktime","replaceable","options","bip32derivs"} },
|
{ "wallet", "walletcreatefundedpsbt", &walletcreatefundedpsbt, {"inputs","outputs","locktime","options","bip32derivs"} },
|
||||||
{ "hidden", "resendwallettransactions", &resendwallettransactions, {} },
|
{ "hidden", "resendwallettransactions", &resendwallettransactions, {} },
|
||||||
{ "wallet", "abandontransaction", &abandontransaction, {"txid"} },
|
{ "wallet", "abandontransaction", &abandontransaction, {"txid"} },
|
||||||
{ "wallet", "abortrescan", &abortrescan, {} },
|
{ "wallet", "abortrescan", &abortrescan, {} },
|
||||||
|
|
Loading…
Reference in a new issue