diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-01-20 14:32:09 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-01-20 14:32:42 +0100 |
| commit | fb75cd04bba36bce7cc22ad1601826ba4b41760e (patch) | |
| tree | 3d1db0d8abc12f91d4e7afa6551e7f2b1c69d52e /src/wallet/wallet.cpp | |
| parent | Merge #9535: Split CNode::cs_vSend: message processing and message sending (diff) | |
| parent | Add fundrawtransactions new reserveChangeKey option to the release notes (diff) | |
| download | discoin-fb75cd04bba36bce7cc22ad1601826ba4b41760e.tar.xz discoin-fb75cd04bba36bce7cc22ad1601826ba4b41760e.zip | |
Merge #9377: fundrawtransaction: Keep change-output keys by default, make it optional
c9f3062 Add fundrawtransactions new reserveChangeKey option to the release notes (Jonas Schnelli)
9eb325d [QA] Add test for fundrawtransactions new reserveChangeKey option (Jonas Schnelli)
9aa4e6a [Wallet] Add an option to keep the change address key, true by default (Jonas Schnelli)
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 625199809..358a5ecfc 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2282,7 +2282,7 @@ bool CWallet::SelectCoins(const vector<COutput>& vAvailableCoins, const CAmount& return res; } -bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, bool overrideEstimatedFeeRate, const CFeeRate& specificFeeRate, int& nChangePosInOut, std::string& strFailReason, bool includeWatching, bool lockUnspents, const std::set<int>& setSubtractFeeFromOutputs, const CTxDestination& destChange) +bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, bool overrideEstimatedFeeRate, const CFeeRate& specificFeeRate, int& nChangePosInOut, std::string& strFailReason, bool includeWatching, bool lockUnspents, const std::set<int>& setSubtractFeeFromOutputs, bool keepReserveKey, const CTxDestination& destChange) { vector<CRecipient> vecSend; @@ -2331,6 +2331,10 @@ bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, bool ov } } + // optionally keep the change output key + if (keepReserveKey) + reservekey.KeepKey(); + return true; } |