diff options
| author | Gregory Sanders <[email protected]> | 2017-04-28 17:22:37 -0400 |
|---|---|---|
| committer | Gregory Sanders <[email protected]> | 2017-05-01 08:07:09 -0400 |
| commit | 7c588637d467bfa18f48a7ca71c0700f90833ea1 (patch) | |
| tree | d31d99a9307803e8011c62164acbc23e50775608 /src | |
| parent | Merge #10075: Remove unused C++ code not covered by unit tests (diff) | |
| download | discoin-7c588637d467bfa18f48a7ca71c0700f90833ea1.tar.xz discoin-7c588637d467bfa18f48a7ca71c0700f90833ea1.zip | |
[Wallet] unset change position when there is no change on exact match
Diffstat (limited to 'src')
| -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 e53ac21c9..d85eedf75 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2563,9 +2563,10 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT std::vector<CTxOut>::iterator position = txNew.vout.begin()+nChangePosInOut; txNew.vout.insert(position, newTxOut); } - } - else + } else { reservekey.ReturnKey(); + nChangePosInOut = -1; + } // Fill vin // |