Dash Core  0.12.2.1
P2P Digital Currency
CPrivateSendClient Class Reference

#include <privatesend-client.h>

+ Inheritance diagram for CPrivateSendClient:

Public Member Functions

 CPrivateSendClient ()
 
void ProcessMessage (CNode *pfrom, std::string &strCommand, CDataStream &vRecv, CConnman &connman)
 
void ClearSkippedDenominations ()
 
void SetMinBlocksToWait (int nMinBlocksToWaitIn)
 
void ResetPool ()
 
void UnlockCoins ()
 
std::string GetStatus ()
 
bool DoAutomaticDenominating (CConnman &connman, bool fDryRun=false)
 Passively run mixing in the background according to the configuration in settings. More...
 
void CheckTimeout ()
 
void NewBlock ()
 Process a new block. More...
 
void UpdatedBlockTip (const CBlockIndex *pindex)
 
- Public Member Functions inherited from CPrivateSendBase
 CPrivateSendBase ()
 
int GetQueueSize () const
 
int GetState () const
 
std::string GetStateString () const
 
int GetEntriesCount () const
 

Public Attributes

int nPrivateSendRounds
 
int nPrivateSendAmount
 
int nLiquidityProvider
 
bool fEnablePrivateSend
 
bool fPrivateSendMultiSession
 
masternode_info_t infoMixingMasternode
 
int nCachedNumBlocks
 
bool fCreateAutoBackups
 
- Public Attributes inherited from CPrivateSendBase
int nSessionDenom
 

Private Member Functions

void CheckPool ()
 Check for process. More...
 
void CompletedTransaction (PoolMessage nMessageID)
 
bool IsDenomSkipped (CAmount nDenomValue)
 
bool WaitForAnotherBlock ()
 
bool CheckAutomaticBackup ()
 
bool JoinExistingQueue (CAmount nBalanceNeedsAnonymized, CConnman &connman)
 
bool StartNewQueue (CAmount nValueMin, CAmount nBalanceNeedsAnonymized, CConnman &connman)
 
bool CreateDenominated (CConnman &connman)
 Create denominations. More...
 
bool CreateDenominated (const CompactTallyItem &tallyItem, bool fCreateMixingCollaterals, CConnman &connman)
 
bool MakeCollateralAmounts (CConnman &connman)
 Split up large inputs or make fee sized inputs. More...
 
bool MakeCollateralAmounts (const CompactTallyItem &tallyItem, bool fTryDenominated, CConnman &connman)
 
bool SubmitDenominate (CConnman &connman)
 As a client, submit part of a future mixing transaction to a Masternode to start the process. More...
 
bool PrepareDenominate (int nMinRounds, int nMaxRounds, std::string &strErrorRet, std::vector< CTxIn > &vecTxInRet, std::vector< CTxOut > &vecTxOutRet)
 step 1: prepare denominated inputs and outputs More...
 
bool SendDenominate (const std::vector< CTxIn > &vecTxIn, const std::vector< CTxOut > &vecTxOut, CConnman &connman)
 step 2: send denominated inputs and outputs prepared in step 1 More...
 
bool CheckPoolStateUpdate (PoolState nStateNew, int nEntriesCountNew, PoolStatusUpdate nStatusUpdate, PoolMessage nMessageID, int nSessionIDNew=0)
 Get Masternode updates about the progress of mixing. More...
 
void SetState (PoolState nStateNew)
 
bool SignFinalTransaction (const CTransaction &finalTransactionNew, CNode *pnode, CConnman &connman)
 As a client, check and sign the final transaction. More...
 
void RelayIn (const CDarkSendEntry &entry, CConnman &connman)
 
void SetNull ()
 

Private Attributes

CCriticalSection cs_darksend
 
std::vector< COutPointvecMasternodesUsed
 
std::vector< CAmountvecDenominationsSkipped
 
std::vector< COutPointvecOutPointLocked
 
int nCachedLastSuccessBlock
 
int nMinBlocksToWait
 
int nCachedBlockHeight
 
int nEntriesCount
 
bool fLastEntryAccepted
 
std::string strLastMessage
 
std::string strAutoDenomResult
 
CMutableTransaction txMyCollateral
 
CKeyHolderStorage keyHolderStorage
 

Additional Inherited Members

- Protected Member Functions inherited from CPrivateSendBase
void SetNull ()
 
- Protected Attributes inherited from CPrivateSendBase
std::vector< CDarksendQueuevecDarksendQueue
 
std::vector< CDarkSendEntryvecEntries
 
PoolState nState
 
int64_t nTimeLastSuccessfulStep
 
int nSessionID
 
CMutableTransaction finalMutableTransaction
 

Detailed Description

Used to keep track of current status of mixing pool

Definition at line 34 of file privatesend-client.h.

Constructor & Destructor Documentation

◆ CPrivateSendClient()

CPrivateSendClient::CPrivateSendClient ( )
inline

Definition at line 114 of file privatesend-client.h.

Member Function Documentation

◆ CheckAutomaticBackup()

bool CPrivateSendClient::CheckAutomaticBackup ( )
private

Definition at line 627 of file privatesend-client.cpp.

Referenced by DoAutomaticDenominating().

◆ CheckPool()

void CPrivateSendClient::CheckPool ( )
private

Check for process.

Definition at line 291 of file privatesend-client.cpp.

Referenced by CheckTimeout().

◆ CheckPoolStateUpdate()

bool CPrivateSendClient::CheckPoolStateUpdate ( PoolState  nStateNew,
int  nEntriesCountNew,
PoolStatusUpdate  nStatusUpdate,
PoolMessage  nMessageID,
int  nSessionIDNew = 0 
)
private

Get Masternode updates about the progress of mixing.

Definition at line 442 of file privatesend-client.cpp.

Referenced by ProcessMessage().

◆ CheckTimeout()

void CPrivateSendClient::CheckTimeout ( )

Definition at line 309 of file privatesend-client.cpp.

Referenced by NewBlock(), and ThreadCheckPrivateSendClient().

◆ ClearSkippedDenominations()

void CPrivateSendClient::ClearSkippedDenominations ( )
inline

Definition at line 128 of file privatesend-client.h.

Referenced by CWallet::CreateTransaction().

◆ CompletedTransaction()

void CPrivateSendClient::CompletedTransaction ( PoolMessage  nMessageID)
private

Definition at line 599 of file privatesend-client.cpp.

Referenced by ProcessMessage().

◆ CreateDenominated() [1/2]

bool CPrivateSendClient::CreateDenominated ( CConnman connman)
private

Create denominations.

Definition at line 1258 of file privatesend-client.cpp.

Referenced by DoAutomaticDenominating().

◆ CreateDenominated() [2/2]

bool CPrivateSendClient::CreateDenominated ( const CompactTallyItem tallyItem,
bool  fCreateMixingCollaterals,
CConnman connman 
)
private

Definition at line 1280 of file privatesend-client.cpp.

◆ DoAutomaticDenominating()

bool CPrivateSendClient::DoAutomaticDenominating ( CConnman connman,
bool  fDryRun = false 
)

Passively run mixing in the background according to the configuration in settings.

Definition at line 695 of file privatesend-client.cpp.

Referenced by privatesend(), OverviewPage::privateSendAuto(), and ThreadCheckPrivateSendClient().

◆ GetStatus()

std::string CPrivateSendClient::GetStatus ( )

◆ IsDenomSkipped()

bool CPrivateSendClient::IsDenomSkipped ( CAmount  nDenomValue)
inlineprivate

Definition at line 65 of file privatesend-client.h.

Referenced by CreateDenominated().

◆ JoinExistingQueue()

bool CPrivateSendClient::JoinExistingQueue ( CAmount  nBalanceNeedsAnonymized,
CConnman connman 
)
private

Definition at line 845 of file privatesend-client.cpp.

Referenced by DoAutomaticDenominating().

◆ MakeCollateralAmounts() [1/2]

bool CPrivateSendClient::MakeCollateralAmounts ( CConnman connman)
private

Split up large inputs or make fee sized inputs.

Definition at line 1160 of file privatesend-client.cpp.

Referenced by DoAutomaticDenominating().

◆ MakeCollateralAmounts() [2/2]

bool CPrivateSendClient::MakeCollateralAmounts ( const CompactTallyItem tallyItem,
bool  fTryDenominated,
CConnman connman 
)
private

Definition at line 1186 of file privatesend-client.cpp.

◆ NewBlock()

void CPrivateSendClient::NewBlock ( )

Process a new block.

Definition at line 586 of file privatesend-client.cpp.

Referenced by UpdatedBlockTip().

◆ PrepareDenominate()

bool CPrivateSendClient::PrepareDenominate ( int  nMinRounds,
int  nMaxRounds,
std::string &  strErrorRet,
std::vector< CTxIn > &  vecTxInRet,
std::vector< CTxOut > &  vecTxOutRet 
)
private

step 1: prepare denominated inputs and outputs

Definition at line 1039 of file privatesend-client.cpp.

Referenced by SubmitDenominate().

◆ ProcessMessage()

void CPrivateSendClient::ProcessMessage ( CNode pfrom,
std::string &  strCommand,
CDataStream vRecv,
CConnman connman 
)

Definition at line 21 of file privatesend-client.cpp.

Referenced by ProcessMessage().

◆ RelayIn()

void CPrivateSendClient::RelayIn ( const CDarkSendEntry entry,
CConnman connman 
)
private

Definition at line 1386 of file privatesend-client.cpp.

Referenced by SendDenominate().

◆ ResetPool()

void CPrivateSendClient::ResetPool ( )

Definition at line 203 of file privatesend-client.cpp.

Referenced by privatesend(), and OverviewPage::privateSendReset().

◆ SendDenominate()

bool CPrivateSendClient::SendDenominate ( const std::vector< CTxIn > &  vecTxIn,
const std::vector< CTxOut > &  vecTxOut,
CConnman connman 
)
private

step 2: send denominated inputs and outputs prepared in step 1

Definition at line 362 of file privatesend-client.cpp.

Referenced by SubmitDenominate().

◆ SetMinBlocksToWait()

void CPrivateSendClient::SetMinBlocksToWait ( int  nMinBlocksToWaitIn)
inline

Definition at line 130 of file privatesend-client.h.

Referenced by AppInit2().

◆ SetNull()

◆ SetState()

void CPrivateSendClient::SetState ( PoolState  nStateNew)
private

◆ SignFinalTransaction()

bool CPrivateSendClient::SignFinalTransaction ( const CTransaction finalTransactionNew,
CNode pnode,
CConnman connman 
)
private

As a client, check and sign the final transaction.

Definition at line 488 of file privatesend-client.cpp.

Referenced by ProcessMessage().

◆ StartNewQueue()

bool CPrivateSendClient::StartNewQueue ( CAmount  nValueMin,
CAmount  nBalanceNeedsAnonymized,
CConnman connman 
)
private

Definition at line 929 of file privatesend-client.cpp.

Referenced by DoAutomaticDenominating().

◆ SubmitDenominate()

bool CPrivateSendClient::SubmitDenominate ( CConnman connman)
private

As a client, submit part of a future mixing transaction to a Masternode to start the process.

Definition at line 1011 of file privatesend-client.cpp.

Referenced by ProcessMessage().

◆ UnlockCoins()

◆ UpdatedBlockTip()

void CPrivateSendClient::UpdatedBlockTip ( const CBlockIndex pindex)

Definition at line 1403 of file privatesend-client.cpp.

Referenced by CDSNotificationInterface::UpdatedBlockTip().

◆ WaitForAnotherBlock()

bool CPrivateSendClient::WaitForAnotherBlock ( )
private

Definition at line 616 of file privatesend-client.cpp.

Referenced by DoAutomaticDenominating(), and GetStatus().

Member Data Documentation

◆ cs_darksend

CCriticalSection CPrivateSendClient::cs_darksend
mutableprivate

Definition at line 37 of file privatesend-client.h.

Referenced by CheckTimeout(), DoAutomaticDenominating(), and ProcessMessage().

◆ fCreateAutoBackups

bool CPrivateSendClient::fCreateAutoBackups

Definition at line 112 of file privatesend-client.h.

Referenced by CheckAutomaticBackup(), and OverviewPage::OverviewPage().

◆ fEnablePrivateSend

◆ fLastEntryAccepted

bool CPrivateSendClient::fLastEntryAccepted
private

Definition at line 52 of file privatesend-client.h.

Referenced by CheckPoolStateUpdate(), GetStatus(), and SetNull().

◆ fPrivateSendMultiSession

bool CPrivateSendClient::fPrivateSendMultiSession

◆ infoMixingMasternode

masternode_info_t CPrivateSendClient::infoMixingMasternode

◆ keyHolderStorage

◆ nCachedBlockHeight

int CPrivateSendClient::nCachedBlockHeight
private

◆ nCachedLastSuccessBlock

int CPrivateSendClient::nCachedLastSuccessBlock
private

◆ nCachedNumBlocks

int CPrivateSendClient::nCachedNumBlocks

◆ nEntriesCount

int CPrivateSendClient::nEntriesCount
private

Definition at line 51 of file privatesend-client.h.

Referenced by CheckPoolStateUpdate(), GetStatus(), ProcessMessage(), and SetNull().

◆ nLiquidityProvider

int CPrivateSendClient::nLiquidityProvider

Definition at line 106 of file privatesend-client.h.

Referenced by AppInit2(), and DoAutomaticDenominating().

◆ nMinBlocksToWait

int CPrivateSendClient::nMinBlocksToWait
private

Definition at line 46 of file privatesend-client.h.

Referenced by SetMinBlocksToWait(), and WaitForAnotherBlock().

◆ nPrivateSendAmount

◆ nPrivateSendRounds

◆ strAutoDenomResult

std::string CPrivateSendClient::strAutoDenomResult
private

◆ strLastMessage

std::string CPrivateSendClient::strLastMessage
private

◆ txMyCollateral

CMutableTransaction CPrivateSendClient::txMyCollateral
private

◆ vecDenominationsSkipped

std::vector<CAmount> CPrivateSendClient::vecDenominationsSkipped
private

◆ vecMasternodesUsed

std::vector<COutPoint> CPrivateSendClient::vecMasternodesUsed
private

◆ vecOutPointLocked

std::vector<COutPoint> CPrivateSendClient::vecOutPointLocked
private

Definition at line 43 of file privatesend-client.h.

Referenced by SendDenominate(), and UnlockCoins().


The documentation for this class was generated from the following files: