From 891c5eeec2dbf295d14e8f888de02637367dd930 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 2 Feb 2017 22:33:24 +0000 Subject: Wallet: Refactor FundTransaction to accept parameters via CCoinControl --- src/wallet/wallet.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/wallet/wallet.cpp') diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 3e000d2a9..c00f52282 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2414,7 +2414,7 @@ bool CWallet::SignTransaction(CMutableTransaction &tx) return true; } -bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, bool overrideEstimatedFeeRate, const CFeeRate& specificFeeRate, int& nChangePosInOut, std::string& strFailReason, bool includeWatching, bool lockUnspents, const std::set& setSubtractFeeFromOutputs, bool keepReserveKey, const CTxDestination& destChange) +bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, int& nChangePosInOut, std::string& strFailReason, bool lockUnspents, const std::set& setSubtractFeeFromOutputs, CCoinControl coinControl, bool keepReserveKey) { std::vector vecSend; @@ -2426,12 +2426,7 @@ bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, bool ov vecSend.push_back(recipient); } - CCoinControl coinControl; - coinControl.destChange = destChange; coinControl.fAllowOtherInputs = true; - coinControl.fAllowWatchOnly = includeWatching; - coinControl.fOverrideFeeRate = overrideEstimatedFeeRate; - coinControl.nFeeRate = specificFeeRate; BOOST_FOREACH(const CTxIn& txin, tx.vin) coinControl.Select(txin.prevout); -- cgit v1.2.3