diff options
| author | Gregory Sanders <[email protected]> | 2017-04-28 17:22:37 -0400 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2017-05-31 10:57:16 +0200 |
| commit | 18476423fba5d2cadd2b0973e425a6ebedeb66a4 (patch) | |
| tree | 05608fb0fb49463e9aa652b1e590ed70222aac24 /src/wallet/wallet.cpp | |
| parent | build: fix bitcoin-config.h regeneration after touching build files (diff) | |
| download | discoin-18476423fba5d2cadd2b0973e425a6ebedeb66a4.tar.xz discoin-18476423fba5d2cadd2b0973e425a6ebedeb66a4.zip | |
[Wallet] unset change position when there is no change on exact match
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 1b59c3cd8..3e93a56d5 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2587,9 +2587,10 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt vector<CTxOut>::iterator position = txNew.vout.begin()+nChangePosInOut; txNew.vout.insert(position, newTxOut); } - } - else + } else { reservekey.ReturnKey(); + nChangePosInOut = -1; + } // Fill vin // |