[Trivial] Update PrivateSend denominations in comments / typo fixes (#1910)

This commit is contained in:
thephez 2018-02-08 00:46:44 -05:00 committed by UdjinM6
parent 8f2c1998de
commit ca89c7b870
4 changed files with 19 additions and 19 deletions

View File

@ -346,7 +346,7 @@ void CPrivateSendClient::CheckTimeout()
bool fTimeout = GetTimeMillis() - nTimeLastSuccessfulStep >= nTimeout*1000 + nLagTime; bool fTimeout = GetTimeMillis() - nTimeLastSuccessfulStep >= nTimeout*1000 + nLagTime;
if(nState != POOL_STATE_IDLE && fTimeout) { if(nState != POOL_STATE_IDLE && fTimeout) {
LogPrint("privatesend", "CPrivateSendClient::CheckTimeout -- %s timed out (%ds) -- restting\n", LogPrint("privatesend", "CPrivateSendClient::CheckTimeout -- %s timed out (%ds) -- resetting\n",
(nState == POOL_STATE_SIGNING) ? "Signing" : "Session", nTimeout); (nState == POOL_STATE_SIGNING) ? "Signing" : "Session", nTimeout);
UnlockCoins(); UnlockCoins();
keyHolderStorage.ReturnAll(); keyHolderStorage.ReturnAll();
@ -626,14 +626,14 @@ bool CPrivateSendClient::CheckAutomaticBackup()
case -1: case -1:
// Automatic backup failed, nothing else we can do until user fixes the issue manually. // Automatic backup failed, nothing else we can do until user fixes the issue manually.
// There is no way to bring user attention in daemon mode so we just update status and // There is no way to bring user attention in daemon mode so we just update status and
// keep spaming if debug is on. // keep spamming if debug is on.
LogPrint("privatesend", "CPrivateSendClient::CheckAutomaticBackup -- ERROR! Failed to create automatic backup.\n"); LogPrint("privatesend", "CPrivateSendClient::CheckAutomaticBackup -- ERROR! Failed to create automatic backup.\n");
strAutoDenomResult = _("ERROR! Failed to create automatic backup") + ", " + _("see debug.log for details."); strAutoDenomResult = _("ERROR! Failed to create automatic backup") + ", " + _("see debug.log for details.");
return false; return false;
case -2: case -2:
// We were able to create automatic backup but keypool was not replenished because wallet is locked. // We were able to create automatic backup but keypool was not replenished because wallet is locked.
// There is no way to bring user attention in daemon mode so we just update status and // There is no way to bring user attention in daemon mode so we just update status and
// keep spaming if debug is on. // keep spamming if debug is on.
LogPrint("privatesend", "CPrivateSendClient::CheckAutomaticBackup -- WARNING! Failed to create replenish keypool, please unlock your wallet to do so.\n"); LogPrint("privatesend", "CPrivateSendClient::CheckAutomaticBackup -- WARNING! Failed to create replenish keypool, please unlock your wallet to do so.\n");
strAutoDenomResult = _("WARNING! Failed to replenish keypool, please unlock your wallet to do so.") + ", " + _("see debug.log for details."); strAutoDenomResult = _("WARNING! Failed to replenish keypool, please unlock your wallet to do so.") + ", " + _("see debug.log for details.");
return false; return false;
@ -1096,7 +1096,7 @@ bool CPrivateSendClient::PrepareDenominate(int nMinRounds, int nMaxRounds, std::
if ((*it2).tx->tx->vout[(*it2).i].nValue == nValueDenom) { if ((*it2).tx->tx->vout[(*it2).i].nValue == nValueDenom) {
// add new input in resulting vector // add new input in resulting vector
vecTxDSInRet.push_back(*it); vecTxDSInRet.push_back(*it);
// remove corresponting items from initial vectors // remove corresponding items from initial vectors
vecTxDSIn.erase(it); vecTxDSIn.erase(it);
vCoins.erase(it2); vCoins.erase(it2);
@ -1209,7 +1209,7 @@ bool CPrivateSendClient::MakeCollateralAmounts(const CompactTallyItem& tallyItem
nFeeRet, nChangePosRet, strFail, &coinControl, true, ONLY_NONDENOMINATED); nFeeRet, nChangePosRet, strFail, &coinControl, true, ONLY_NONDENOMINATED);
if(!fSuccess) { if(!fSuccess) {
LogPrintf("CPrivateSendClient::MakeCollateralAmounts -- ONLY_NONDENOMINATED: %s\n", strFail); LogPrintf("CPrivateSendClient::MakeCollateralAmounts -- ONLY_NONDENOMINATED: %s\n", strFail);
// If we failed then most likeky there are not enough funds on this address. // If we failed then most likely there are not enough funds on this address.
if(fTryDenominated) { if(fTryDenominated) {
// Try to also use denominated coins (we can't mix denominated without collaterals anyway). // Try to also use denominated coins (we can't mix denominated without collaterals anyway).
if(!pwalletMain->CreateTransaction(vecSend, wtx, reservekeyChange, if(!pwalletMain->CreateTransaction(vecSend, wtx, reservekeyChange,
@ -1229,7 +1229,7 @@ bool CPrivateSendClient::MakeCollateralAmounts(const CompactTallyItem& tallyItem
LogPrintf("CPrivateSendClient::MakeCollateralAmounts -- txid=%s\n", wtx.GetHash().GetHex()); LogPrintf("CPrivateSendClient::MakeCollateralAmounts -- txid=%s\n", wtx.GetHash().GetHex());
// use the same nCachedLastSuccessBlock as for DS mixinx to prevent race // use the same nCachedLastSuccessBlock as for DS mixing to prevent race
CValidationState state; CValidationState state;
if(!pwalletMain->CommitTransaction(wtx, reservekeyChange, &connman, state)) { if(!pwalletMain->CommitTransaction(wtx, reservekeyChange, &connman, state)) {
LogPrintf("CPrivateSendClient::MakeCollateralAmounts -- CommitTransaction failed! Reason given: %s\n", state.GetRejectReason()); LogPrintf("CPrivateSendClient::MakeCollateralAmounts -- CommitTransaction failed! Reason given: %s\n", state.GetRejectReason());

View File

@ -384,7 +384,7 @@ void CPrivateSendServer::CommitFinalTransaction(CConnman& connman)
// Why bother? PrivateSend uses collateral to ensure abuse to the process is kept to a minimum. // Why bother? PrivateSend uses collateral to ensure abuse to the process is kept to a minimum.
// The submission and signing stages are completely separate. In the cases where // The submission and signing stages are completely separate. In the cases where
// a client submits a transaction then refused to sign, there must be a cost. Otherwise they // a client submits a transaction then refused to sign, there must be a cost. Otherwise they
// would be able to do this over and over again and bring the mixing to a hault. // would be able to do this over and over again and bring the mixing to a halt.
// //
// How does this work? Messages to Masternodes come in via NetMsgType::DSVIN, these require a valid collateral // How does this work? Messages to Masternodes come in via NetMsgType::DSVIN, these require a valid collateral
// transaction for the client to be able to enter the pool. This transaction is kept by the Masternode // transaction for the client to be able to enter the pool. This transaction is kept by the Masternode
@ -504,7 +504,7 @@ void CPrivateSendServer::CheckTimeout(CConnman& connman)
bool fTimeout = GetTimeMillis() - nTimeLastSuccessfulStep >= nTimeout*1000 + nLagTime; bool fTimeout = GetTimeMillis() - nTimeLastSuccessfulStep >= nTimeout*1000 + nLagTime;
if(nState != POOL_STATE_IDLE && fTimeout) { if(nState != POOL_STATE_IDLE && fTimeout) {
LogPrint("privatesend", "CPrivateSendServer::CheckTimeout -- %s timed out (%ds) -- restting\n", LogPrint("privatesend", "CPrivateSendServer::CheckTimeout -- %s timed out (%ds) -- resetting\n",
(nState == POOL_STATE_SIGNING) ? "Signing" : "Session", nTimeout); (nState == POOL_STATE_SIGNING) ? "Signing" : "Session", nTimeout);
ChargeFees(connman); ChargeFees(connman);
SetNull(); SetNull();

View File

@ -156,8 +156,8 @@ void CPrivateSend::InitStandardDenominations()
vecStandardDenominations.clear(); vecStandardDenominations.clear();
/* Denominations /* Denominations
A note about convertability. Within mixing pools, each denomination A note about convertibility. Within mixing pools, each denomination
is convertable to another. is convertible to another.
For example: For example:
1DRK+1000 == (.1DRK+100)*10 1DRK+1000 == (.1DRK+100)*10
@ -233,10 +233,10 @@ bool CPrivateSend::IsCollateralAmount(CAmount nInputAmount)
/* Create a nice string to show the denominations /* Create a nice string to show the denominations
Function returns as follows (for 4 denominations): Function returns as follows (for 4 denominations):
( bit on if present ) ( bit on if present )
bit 0 - 100 bit 0 - 10
bit 1 - 10 bit 1 - 1
bit 2 - 1 bit 2 - .1
bit 3 - .1 bit 3 - .01
bit 4 and so on - out-of-bounds bit 4 and so on - out-of-bounds
none of above - non-denom none of above - non-denom
*/ */
@ -265,10 +265,10 @@ std::string CPrivateSend::GetDenominationsToString(int nDenom)
/* Return a bitshifted integer representing the denominations in this list /* Return a bitshifted integer representing the denominations in this list
Function returns as follows (for 4 denominations): Function returns as follows (for 4 denominations):
( bit on if present ) ( bit on if present )
100 - bit 0 10 - bit 0
10 - bit 1 1 - bit 1
1 - bit 2 .1 - bit 2
.1 - bit 3 .01 - bit 3
non-denom - 0, all bits off non-denom - 0, all bits off
*/ */
int CPrivateSend::GetDenominations(const std::vector<CTxOut>& vecTxOut, bool fSingleRandomDenom) int CPrivateSend::GetDenominations(const std::vector<CTxOut>& vecTxOut, bool fSingleRandomDenom)

View File

@ -166,7 +166,7 @@ public:
/** /**
* A currently inprogress mixing merge and denomination information * A currently in progress mixing merge and denomination information
*/ */
class CDarksendQueue class CDarksendQueue
{ {