diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-05-01 15:19:47 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-05-01 15:20:51 +0200 |
commit | e2b99b13131b5d0fd6fae6d55892c2ebb327d438 (patch) | |
tree | b24f6f50bba69d6373ca0f62567d0d6b69136f6d /src | |
parent | 492d22f92919d8d9d59568318c26c1e2ac4890cc (diff) | |
parent | 7c588637d467bfa18f48a7ca71c0700f90833ea1 (diff) | |
download | bitcoin-e2b99b13131b5d0fd6fae6d55892c2ebb327d438.tar.xz |
Merge #10294: [Wallet] unset change position when there is no change
7c58863 [Wallet] unset change position when there is no change on exact match (Gregory Sanders)
Tree-SHA512: ce8b9337e4132e32d80f954258d50938052c833a48e39431649d6adb16e3d18626a0ae5d300827e7fa397927fba72a1f066cb31af9b0a3ef7f1feb6024461626
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 e53ac21c9a..d85eedf752 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 // |