diff options
| author | Jonas Schnelli <[email protected]> | 2016-12-19 09:04:05 +0100 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2017-01-19 20:38:37 +0100 |
| commit | 9aa4e6a6c2cb9b4465d014c8efa672a919ff8f89 (patch) | |
| tree | 6e7eb37a4f2697417f84e3c3029e328132c7ad59 /src/wallet/wallet.cpp | |
| parent | Merge #9499: Use recent-rejects, orphans, and recently-replaced txn for compa... (diff) | |
| download | discoin-9aa4e6a6c2cb9b4465d014c8efa672a919ff8f89.tar.xz discoin-9aa4e6a6c2cb9b4465d014c8efa672a919ff8f89.zip | |
[Wallet] Add an option to keep the change address key, true by default
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 0b18be876..06382af18 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2192,7 +2192,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; @@ -2241,6 +2241,10 @@ bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, bool ov } } + // optionally keep the change output key + if (keepReserveKey) + reservekey.KeepKey(); + return true; } |