Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 3,402 Lines • ▼ Show 20 Lines | static UniValue fundrawtransaction(const Config &config, | ||||
if (!pwallet->FundTransaction( | if (!pwallet->FundTransaction( | ||||
tx, nFeeOut, overrideEstimatedFeerate, feeRate, changePosition, | tx, nFeeOut, overrideEstimatedFeerate, feeRate, changePosition, | ||||
strFailReason, includeWatching, lockUnspents, | strFailReason, includeWatching, lockUnspents, | ||||
setSubtractFeeFromOutputs, reserveChangeKey, changeAddress)) { | setSubtractFeeFromOutputs, reserveChangeKey, changeAddress)) { | ||||
throw JSONRPCError(RPC_WALLET_ERROR, strFailReason); | throw JSONRPCError(RPC_WALLET_ERROR, strFailReason); | ||||
} | } | ||||
UniValue result(UniValue::VOBJ); | UniValue result(UniValue::VOBJ); | ||||
result.push_back(Pair("hex", EncodeHexTx(tx))); | result.push_back(Pair("hex", EncodeHexTx(CTransaction(tx)))); | ||||
result.push_back(Pair("changepos", changePosition)); | result.push_back(Pair("changepos", changePosition)); | ||||
result.push_back(Pair("fee", ValueFromAmount(nFeeOut))); | result.push_back(Pair("fee", ValueFromAmount(nFeeOut))); | ||||
return result; | return result; | ||||
} | } | ||||
static UniValue generate(const Config &config, const JSONRPCRequest &request) { | static UniValue generate(const Config &config, const JSONRPCRequest &request) { | ||||
CWallet *const pwallet = GetWalletForJSONRPCRequest(request); | CWallet *const pwallet = GetWalletForJSONRPCRequest(request); | ||||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |