improved anonymity for smaller wallets

This commit is contained in:
Evan Duffield 2015-01-20 02:42:15 -07:00
parent 31215c3a63
commit b40bfacb55
3 changed files with 5 additions and 2 deletions

View File

@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 11)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 9)
define(_CLIENT_VERSION_BUILD, 10)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2015)
AC_INIT([Darkcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@darkcoin.io],[darkcoin])

View File

@ -12,7 +12,7 @@
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 11
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 9
#define CLIENT_VERSION_BUILD 10

View File

@ -1558,6 +1558,9 @@ bool CWallet::SelectCoinsByDenominations(int nDenom, int64_t nValueMin, int64_t
if(nValueRet >= nValueMin){
//random reduce the max amount we'll submit for anonymity
nValueMax -= (rand() % (nValueMax/5));
//on average use 50% of the inputs or less
int r = (rand() % (int)vCoins.size());
if((int)setCoinsRet.size() > r) return true;
}
//Denomination criterion has been met, we can take any matching denominations
if((nDenom & (1 << 0)) && out.tx->vout[out.i].nValue == ((100*COIN)+1)) {fAccepted = true;}