mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
added some debugging
This commit is contained in:
parent
4fa1913ebb
commit
7e39d3fa6b
@ -9,7 +9,7 @@
|
||||
#define CLIENT_VERSION_MAJOR 0
|
||||
#define CLIENT_VERSION_MINOR 10
|
||||
#define CLIENT_VERSION_REVISION 15
|
||||
#define CLIENT_VERSION_BUILD 10
|
||||
#define CLIENT_VERSION_BUILD 11
|
||||
|
||||
// Set to true for release, false for prerelease or test build
|
||||
#define CLIENT_VERSION_IS_RELEASE true
|
||||
|
@ -642,6 +642,8 @@ void CDarkSendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
|
||||
LogPrintf("dsi -- transactione not valid! %s \n", tx.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
printf("CDarksendPool::SendDarksendDenominate() - preparing transaction - \n %s\n", tx.ToString().c_str());
|
||||
}
|
||||
|
||||
// store our entry for later use
|
||||
@ -1556,7 +1558,7 @@ bool CDarkSendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
|
||||
|
||||
sessionAmount = nTotalValue;
|
||||
pnode->PushMessage("dsa", nTotalValue, txCollateral);
|
||||
LogPrintf("DoAutomaticDenominating --- connected (from queue), sending dsa for %"PRI64d"\n", nTotalValue);
|
||||
LogPrintf("DoAutomaticDenominating --- connected (from queue), sending dsa for %"PRI64d" - denom %d\n", nTotalValue, GetDenominationsByAmount(nTotalValue));
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
@ -1591,7 +1593,7 @@ bool CDarkSendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
|
||||
|
||||
sessionAmount = nTotalValue;
|
||||
pnode->PushMessage("dsa", nTotalValue, txCollateral);
|
||||
LogPrintf("DoAutomaticDenominating --- connected, sending dsa for %"PRI64d"\n", nTotalValue);
|
||||
LogPrintf("DoAutomaticDenominating --- connected, sending dsa for %"PRI64d" - denom %d\n", nTotalValue, GetDenominationsByAmount(nTotalValue));
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
@ -1855,6 +1857,13 @@ bool CDarkSendPool::IsCompatibleWithEntries(std::vector<CTxOut> vout)
|
||||
{
|
||||
BOOST_FOREACH(const CDarkSendEntry v, entries) {
|
||||
LogPrintf(" IsCompatibleWithEntries %d %d\n", GetDenominations(vout), GetDenominations(v.vout));
|
||||
|
||||
BOOST_FOREACH(CTxOut o1, vout)
|
||||
LogPrintf(" vout 1 - %s\n", o1.ToString().c_str());
|
||||
|
||||
BOOST_FOREACH(CTxOut o2, v.vout)
|
||||
LogPrintf(" vout 2 - %s\n", o2.ToString().c_str());
|
||||
|
||||
if(GetDenominations(vout) != GetDenominations(v.vout)) return false;
|
||||
}
|
||||
|
||||
|
@ -170,6 +170,50 @@ BOOST_AUTO_TEST_CASE(darksend_denom)
|
||||
|
||||
BOOST_CHECK(darkSendPool.GetDenominations(vout1) != darkSendPool.GetDenominations(vout2));
|
||||
|
||||
vout1.clear();
|
||||
vout2.clear();
|
||||
|
||||
vout1.push_back(d1);
|
||||
vout1.push_back(d3);
|
||||
vout1.push_back(d2);
|
||||
|
||||
vout2.push_back(d1);
|
||||
vout2.push_back(d2);
|
||||
vout2.push_back(d3);
|
||||
|
||||
BOOST_CHECK(darkSendPool.GetDenominations(vout1) == darkSendPool.GetDenominations(vout2));
|
||||
|
||||
vout1.clear();
|
||||
vout2.clear();
|
||||
|
||||
vout1.push_back(d1);
|
||||
vout1.push_back(d3);
|
||||
vout1.push_back(d2);
|
||||
|
||||
vout2.push_back(d3);
|
||||
vout2.push_back(d2);
|
||||
vout2.push_back(d1);
|
||||
|
||||
BOOST_CHECK(darkSendPool.GetDenominations(vout1) == darkSendPool.GetDenominations(vout2));
|
||||
|
||||
vout1.clear();
|
||||
vout2.clear();
|
||||
|
||||
vout1.push_back(d1);
|
||||
vout1.push_back(d3);
|
||||
vout1.push_back(d2);
|
||||
|
||||
vout2.push_back(d3);
|
||||
vout2.push_back(d2);
|
||||
vout2.push_back(d2);
|
||||
vout2.push_back(d2);
|
||||
vout2.push_back(d1);
|
||||
|
||||
BOOST_CHECK(darkSendPool.GetDenominations(vout1) == darkSendPool.GetDenominations(vout2));
|
||||
|
||||
vout2.push_back(d4);
|
||||
|
||||
BOOST_CHECK(darkSendPool.GetDenominations(vout1) != darkSendPool.GetDenominations(vout2));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(darksend_session)
|
||||
|
@ -1833,7 +1833,7 @@ string CWallet::PrepareDarksendDenominate(int minRounds, int64 maxAmount)
|
||||
}
|
||||
}
|
||||
|
||||
int64 nFeeRet = 0.0125*COIN; ///need to get a better fee calc
|
||||
int64 nFeeRet = 0.0125*COIN;
|
||||
|
||||
// ** find the coins we'll use
|
||||
std::vector<CTxIn> vCoins;
|
||||
@ -1844,7 +1844,7 @@ string CWallet::PrepareDarksendDenominate(int minRounds, int64 maxAmount)
|
||||
bool hasFeeInput = false;
|
||||
|
||||
//select coins we'll use
|
||||
if (!SelectCoinsDark(1*COIN, maxAmount, vCoins, nValueIn, minRounds, nDarksendRounds, hasFeeInput))
|
||||
if (!SelectCoinsDark(1*COIN, maxAmount + nFeeRet, vCoins, nValueIn, minRounds, nDarksendRounds, hasFeeInput))
|
||||
{
|
||||
vCoins.clear();
|
||||
|
||||
@ -1858,6 +1858,8 @@ string CWallet::PrepareDarksendDenominate(int minRounds, int64 maxAmount)
|
||||
// calculate total value out
|
||||
int64 nTotalValue = GetTotalValue(vCoins) - nFeeRet;
|
||||
|
||||
LogPrintf("PrepareDarksendDenominate - preparing darksend denominate . Asked for: %"PRI64u", Got: %"PRI64u" \n", maxAmount, nTotalValue);
|
||||
|
||||
//--------------
|
||||
|
||||
BOOST_FOREACH(CTxIn v, vCoins)
|
||||
|
Loading…
Reference in New Issue
Block a user