@@ -4643,7 +4643,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
4643
4643
return NullUniValue;
4644
4644
}
4645
4645
4646
- if (request.fHelp || request.params .size () < 2 || request.params .size () > 6 )
4646
+ if (request.fHelp || request.params .size () < 2 || request.params .size () > 5 )
4647
4647
throw std::runtime_error (
4648
4648
" walletcreatefundedpsbt [{\" txid\" :\" id\" ,\" vout\" :n},...] [{\" address\" :amount},{\" data\" :\" hex\" },...] ( locktime ) ( replaceable ) ( options bip32derivs )\n "
4649
4649
" \n Creates 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)
4670
4670
" accepted as second parameter.\n "
4671
4671
" ]\n "
4672
4672
" 3. locktime (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs\n "
4673
- " 4. replaceable (boolean, optional, default=false) Marks this transaction as BIP125 replaceable.\n "
4674
4673
" 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 "
4675
- " 5 . options (object, optional)\n "
4674
+ " 4 . options (object, optional)\n "
4676
4675
" {\n "
4677
4676
" \" changeAddress\" (string, optional, default pool address) The bitcoin address to receive the change\n "
4678
4677
" \" changePosition\" (numeric, optional, default random) The index of the change output\n "
@@ -4694,7 +4693,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
4694
4693
" \" ECONOMICAL\"\n "
4695
4694
" \" CONSERVATIVE\"\n "
4696
4695
" }\n "
4697
- " 6 . bip32derivs (boolean, optiona, default=false) If true, includes the BIP 32 derivation paths for public keys if we know them\n "
4696
+ " 5 . bip32derivs (boolean, optiona, default=false) If true, includes the BIP 32 derivation paths for public keys if we know them\n "
4698
4697
" \n Result:\n "
4699
4698
" {\n "
4700
4699
" \" psbt\" : \" value\" , (string) The resulting raw transaction (base64-encoded string)\n "
@@ -4710,15 +4709,14 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
4710
4709
UniValue::VARR,
4711
4710
UniValueType (), // ARR or OBJ, checked later
4712
4711
UniValue::VNUM,
4713
- UniValue::VBOOL,
4714
4712
UniValue::VOBJ
4715
4713
}, true
4716
4714
);
4717
4715
4718
4716
CAmount fee;
4719
4717
int change_position;
4720
- CMutableTransaction rawTx = ConstructTransaction (request.params [0 ], request.params [1 ], request.params [2 ], request.params [3 ]);
4721
- FundTransaction (pwallet, rawTx, fee, change_position, request.params [4 ]);
4718
+ CMutableTransaction rawTx = ConstructTransaction (request.params [0 ], request.params [1 ], request.params [2 ], request.params [3 ][ " replaceable " ] );
4719
+ FundTransaction (pwallet, rawTx, fee, change_position, request.params [3 ]);
4722
4720
4723
4721
// Make a blank psbt
4724
4722
PartiallySignedTransaction psbtx;
@@ -4735,7 +4733,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
4735
4733
const CTransaction txConst (*psbtx.tx );
4736
4734
4737
4735
// Fill transaction with out data but don't sign
4738
- bool bip32derivs = request.params [5 ].isNull () ? false : request.params [5 ].get_bool ();
4736
+ bool bip32derivs = request.params [4 ].isNull () ? false : request.params [5 ].get_bool ();
4739
4737
FillPSBT (pwallet, psbtx, &txConst, 1 , false , bip32derivs);
4740
4738
4741
4739
// Serialize the PSBT
@@ -4765,7 +4763,7 @@ static const CRPCCommand commands[] =
4765
4763
// --------------------- ------------------------ ----------------------- ----------
4766
4764
{ " rawtransactions" , " fundrawtransaction" , &fundrawtransaction, {" hexstring" ," options" ," iswitness" } },
4767
4765
{ " wallet" , " walletprocesspsbt" , &walletprocesspsbt, {" psbt" ," sign" ," sighashtype" ," bip32derivs" } },
4768
- { " wallet" , " walletcreatefundedpsbt" , &walletcreatefundedpsbt, {" inputs" ," outputs" ," locktime" ," replaceable " , " options" ," bip32derivs" } },
4766
+ { " wallet" , " walletcreatefundedpsbt" , &walletcreatefundedpsbt, {" inputs" ," outputs" ," locktime" ," options" ," bip32derivs" } },
4769
4767
{ " hidden" , " resendwallettransactions" , &resendwallettransactions, {} },
4770
4768
{ " wallet" , " abandontransaction" , &abandontransaction, {" txid" } },
4771
4769
{ " wallet" , " abortrescan" , &abortrescan, {} },
0 commit comments