@ -2693,7 +2693,6 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
" \" changePosition \" (numeric, optional, default random) The index of the change output \n "
" \" changePosition \" (numeric, optional, default random) The index of the change output \n "
" \" includeWatching \" (boolean, optional, default false) Also select inputs which are watch only \n "
" \" includeWatching \" (boolean, optional, default false) Also select inputs which are watch only \n "
" \" lockUnspents \" (boolean, optional, default false) Lock selected unspent outputs \n "
" \" lockUnspents \" (boolean, optional, default false) Lock selected unspent outputs \n "
" \" reserveChangeKey \" (boolean, optional, default true) Reserves the change output key from the keypool \n "
" \" feeRate \" (numeric, optional, default not set: makes wallet determine the fee) Set a specific feerate ( " + CURRENCY_UNIT + " per KB) \n "
" \" feeRate \" (numeric, optional, default not set: makes wallet determine the fee) Set a specific feerate ( " + CURRENCY_UNIT + " per KB) \n "
" \" subtractFeeFromOutputs \" (array, optional) A json array of integers. \n "
" \" subtractFeeFromOutputs \" (array, optional) A json array of integers. \n "
" The fee will be equally deducted from the amount of each specified output. \n "
" The fee will be equally deducted from the amount of each specified output. \n "
@ -2732,7 +2731,6 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
CCoinControl coinControl ;
CCoinControl coinControl ;
int changePosition = - 1 ;
int changePosition = - 1 ;
bool lockUnspents = false ;
bool lockUnspents = false ;
bool reserveChangeKey = true ;
UniValue subtractFeeFromOutputs ;
UniValue subtractFeeFromOutputs ;
std : : set < int > setSubtractFeeFromOutputs ;
std : : set < int > setSubtractFeeFromOutputs ;
@ -2752,7 +2750,7 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
{ " changePosition " , UniValueType ( UniValue : : VNUM ) } ,
{ " changePosition " , UniValueType ( UniValue : : VNUM ) } ,
{ " includeWatching " , UniValueType ( UniValue : : VBOOL ) } ,
{ " includeWatching " , UniValueType ( UniValue : : VBOOL ) } ,
{ " lockUnspents " , UniValueType ( UniValue : : VBOOL ) } ,
{ " lockUnspents " , UniValueType ( UniValue : : VBOOL ) } ,
{ " reserveChangeKey " , UniValueType ( UniValue : : VBOOL ) } ,
{ " reserveChangeKey " , UniValueType ( UniValue : : VBOOL ) } , // DEPRECATED (and ignored), should be removed in 0.16 or so.
{ " feeRate " , UniValueType ( ) } , // will be checked below
{ " feeRate " , UniValueType ( ) } , // will be checked below
{ " subtractFeeFromOutputs " , UniValueType ( UniValue : : VARR ) } ,
{ " subtractFeeFromOutputs " , UniValueType ( UniValue : : VARR ) } ,
{ " replaceable " , UniValueType ( UniValue : : VBOOL ) } ,
{ " replaceable " , UniValueType ( UniValue : : VBOOL ) } ,
@ -2779,9 +2777,6 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
if ( options . exists ( " lockUnspents " ) )
if ( options . exists ( " lockUnspents " ) )
lockUnspents = options [ " lockUnspents " ] . get_bool ( ) ;
lockUnspents = options [ " lockUnspents " ] . get_bool ( ) ;
if ( options . exists ( " reserveChangeKey " ) )
reserveChangeKey = options [ " reserveChangeKey " ] . get_bool ( ) ;
if ( options . exists ( " feeRate " ) )
if ( options . exists ( " feeRate " ) )
{
{
coinControl . m_feerate = CFeeRate ( AmountFromValue ( options [ " feeRate " ] ) ) ;
coinControl . m_feerate = CFeeRate ( AmountFromValue ( options [ " feeRate " ] ) ) ;
@ -2830,7 +2825,7 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
CAmount nFeeOut ;
CAmount nFeeOut ;
std : : string strFailReason ;
std : : string strFailReason ;
if ( ! pwallet - > FundTransaction ( tx , nFeeOut , changePosition , strFailReason , lockUnspents , setSubtractFeeFromOutputs , coinControl , reserveChangeKey ) ) {
if ( ! pwallet - > FundTransaction ( tx , nFeeOut , changePosition , strFailReason , lockUnspents , setSubtractFeeFromOutputs , coinControl ) ) {
throw JSONRPCError ( RPC_WALLET_ERROR , strFailReason ) ;
throw JSONRPCError ( RPC_WALLET_ERROR , strFailReason ) ;
}
}