Browse Source

Merge pull request #2246 from gavinandresen/changefix

Correctly randomize change output position
tags/v0.15.1
Gavin Andresen 8 years ago
parent
commit
a078121373
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/wallet.cpp

+ 1
- 1
src/wallet.cpp View File

@@ -1190,7 +1190,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
scriptChange.SetDestination(vchPubKey.GetID());

// Insert change txn at random position:
vector<CTxOut>::iterator position = wtxNew.vout.begin()+GetRandInt(wtxNew.vout.size());
vector<CTxOut>::iterator position = wtxNew.vout.begin()+GetRandInt(wtxNew.vout.size()+1);
wtxNew.vout.insert(position, CTxOut(nChange, scriptChange));
}
else

Loading…
Cancel
Save