cleaned up a bit

This commit is contained in:
Evan Duffield 2014-07-30 08:49:30 -07:00
parent c6dcd9c2fd
commit d674748059

View File

@ -1656,18 +1656,16 @@ string CWallet::DarkSendDenominate()
// ** find the coins we'll use // ** find the coins we'll use
std::vector<CTxIn> vCoins; std::vector<CTxIn> vCoins;
int64 nValueIn = 0; int64 nValueIn = 0;
CReserveKey reservekey(this);
//try to use denominated funds (for added anonymity) //select coins we'll use
if (!SelectCoinsDark(1*COIN, 1000*COIN, vCoins, nValueIn, -2, nDarksendRounds)) if (!SelectCoinsDark(1*COIN, 1000*COIN, vCoins, nValueIn, -2, nDarksendRounds))
{ {
vCoins.clear(); vCoins.clear();
return _("Insufficient funds"); return _("Insufficient funds");
} }
//printf(" --- nValueIn %"PRI64d" nTotalValue %"PRI64d"\n", nValueIn, nTotalValue); // calculate total value out
// calculate total value out --------
int64 nTotalValue = 0; int64 nTotalValue = 0;
CWalletTx wtx; CWalletTx wtx;
BOOST_FOREACH(CTxIn i, vCoins){ BOOST_FOREACH(CTxIn i, vCoins){
@ -1704,7 +1702,7 @@ string CWallet::DarkSendDenominate()
CPubKey vchPubKey; CPubKey vchPubKey;
assert(reservekey.GetReservedKey(vchPubKey)); // should never fail, as we just unlocked assert(reservekey.GetReservedKey(vchPubKey)); // should never fail, as we just unlocked
scriptChange.SetDestination(vchPubKey.GetID()); scriptChange.SetDestination(vchPubKey.GetID());
reservekey.KeepKey() reservekey.KeepKey();
CTxOut vout2 = CTxOut(POOL_FEE_AMOUNT, darkSendPool.collateralPubKey); CTxOut vout2 = CTxOut(POOL_FEE_AMOUNT, darkSendPool.collateralPubKey);