Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 3,638 Lines • ▼ Show 20 Lines | for (size_t idx = 0; idx < subtractFeeFromOutputs.size(); idx++) { | ||||
setSubtractFeeFromOutputs.insert(pos); | setSubtractFeeFromOutputs.insert(pos); | ||||
} | } | ||||
Amount nFeeOut; | Amount nFeeOut; | ||||
std::string strFailReason; | std::string strFailReason; | ||||
if (!pwallet->FundTransaction(tx, nFeeOut, changePosition, strFailReason, | if (!pwallet->FundTransaction(tx, nFeeOut, changePosition, strFailReason, | ||||
lockUnspents, setSubtractFeeFromOutputs, | lockUnspents, setSubtractFeeFromOutputs, | ||||
coinControl)) { | coinControl, reserveChangeKey)) { | ||||
throw JSONRPCError(RPC_WALLET_ERROR, strFailReason); | throw JSONRPCError(RPC_WALLET_ERROR, strFailReason); | ||||
} | } | ||||
UniValue result(UniValue::VOBJ); | UniValue result(UniValue::VOBJ); | ||||
result.pushKV("hex", EncodeHexTx(CTransaction(tx))); | result.pushKV("hex", EncodeHexTx(CTransaction(tx))); | ||||
result.pushKV("changepos", changePosition); | result.pushKV("changepos", changePosition); | ||||
result.pushKV("fee", ValueFromAmount(nFeeOut)); | result.pushKV("fee", ValueFromAmount(nFeeOut)); | ||||
▲ Show 20 Lines • Show All 287 Lines • Show Last 20 Lines |