Dash Core  0.12.2.1
P2P Digital Currency
CPrivateSend Class Reference

#include <privatesend.h>

Static Public Member Functions

static void InitStandardDenominations ()
 
static std::vector< CAmountGetStandardDenominations ()
 
static CAmount GetSmallestDenomination ()
 
static int GetDenominationsByAmounts (const std::vector< CAmount > &vecAmount)
 Get the denominations for a specific amount of dash. More...
 
static int GetDenominations (const std::vector< CTxOut > &vecTxOut, bool fSingleRandomDenom=false)
 Get the denominations for a list of outputs (returns a bitshifted integer) More...
 
static int GetDenominations (const std::vector< CTxDSOut > &vecTxDSOut)
 
static std::string GetDenominationsToString (int nDenom)
 
static bool GetDenominationsBits (int nDenom, std::vector< int > &vecBitsRet)
 
static std::string GetMessageByID (PoolMessage nMessageID)
 
static int GetMaxPoolTransactions ()
 Get the maximum number of transactions for the pool. More...
 
static CAmount GetMaxPoolAmount ()
 
static bool IsCollateralValid (const CTransaction &txCollateral)
 If the collateral is valid given by a client. More...
 
static CAmount GetCollateralAmount ()
 
static CAmount GetMaxCollateralAmount ()
 
static void AddDSTX (const CDarksendBroadcastTx &dstx)
 
static CDarksendBroadcastTx GetDSTX (const uint256 &hash)
 
static void CheckDSTXes (int nHeight)
 
static void SyncTransaction (const CTransaction &tx, const CBlock *pblock)
 

Private Member Functions

 CPrivateSend ()
 
 ~CPrivateSend ()
 
 CPrivateSend (CPrivateSend const &)=delete
 
CPrivateSendoperator= (CPrivateSend const &)=delete
 

Static Private Attributes

static const CAmount COLLATERAL = 0.001 * COIN
 
static std::vector< CAmountvecStandardDenominations
 
static std::map< uint256, CDarksendBroadcastTxmapDSTX
 
static CCriticalSection cs_mapdstx
 

Detailed Description

Definition at line 309 of file privatesend.h.

Constructor & Destructor Documentation

◆ CPrivateSend() [1/2]

CPrivateSend::CPrivateSend ( )
inlineprivate

Definition at line 313 of file privatesend.h.

◆ ~CPrivateSend()

CPrivateSend::~CPrivateSend ( )
inlineprivate

Definition at line 314 of file privatesend.h.

◆ CPrivateSend() [2/2]

CPrivateSend::CPrivateSend ( CPrivateSend const &  )
privatedelete

Member Function Documentation

◆ AddDSTX()

void CPrivateSend::AddDSTX ( const CDarksendBroadcastTx dstx)
static

Definition at line 368 of file privatesend.cpp.

Referenced by CPrivateSendServer::CommitFinalTransaction(), and ProcessMessage().

◆ CheckDSTXes()

void CPrivateSend::CheckDSTXes ( int  nHeight)
static

Definition at line 381 of file privatesend.cpp.

Referenced by CPrivateSendClient::UpdatedBlockTip().

◆ GetCollateralAmount()

◆ GetDenominations() [1/2]

int CPrivateSend::GetDenominations ( const std::vector< CTxOut > &  vecTxOut,
bool  fSingleRandomDenom = false 
)
static

Get the denominations for a list of outputs (returns a bitshifted integer)

Definition at line 271 of file privatesend.cpp.

Referenced by GetDenominations(), GetDenominationsByAmounts(), CPrivateSendServer::IsOutputsCompatibleWithSessionDenom(), and CPrivateSendClient::PrepareDenominate().

◆ GetDenominations() [2/2]

int CPrivateSend::GetDenominations ( const std::vector< CTxDSOut > &  vecTxDSOut)
static

Definition at line 252 of file privatesend.cpp.

◆ GetDenominationsBits()

bool CPrivateSend::GetDenominationsBits ( int  nDenom,
std::vector< int > &  vecBitsRet 
)
static

◆ GetDenominationsByAmounts()

int CPrivateSend::GetDenominationsByAmounts ( const std::vector< CAmount > &  vecAmount)
static

Get the denominations for a specific amount of dash.

Definition at line 326 of file privatesend.cpp.

Referenced by CPrivateSendClient::StartNewQueue().

◆ GetDenominationsToString()

◆ GetDSTX()

CDarksendBroadcastTx CPrivateSend::GetDSTX ( const uint256 hash)
static

◆ GetMaxCollateralAmount()

◆ GetMaxPoolAmount()

static CAmount CPrivateSend::GetMaxPoolAmount ( )
inlinestatic

◆ GetMaxPoolTransactions()

static int CPrivateSend::GetMaxPoolTransactions ( )
inlinestatic

Get the maximum number of transactions for the pool.

Definition at line 343 of file privatesend.h.

Referenced by CPrivateSendServer::AddEntry(), CPrivateSendServer::CheckPool(), CPrivateSendClient::GetStatus(), and CPrivateSendServer::IsSessionReady().

◆ GetMessageByID()

std::string CPrivateSend::GetMessageByID ( PoolMessage  nMessageID)
static

◆ GetSmallestDenomination()

◆ GetStandardDenominations()

◆ InitStandardDenominations()

void CPrivateSend::InitStandardDenominations ( )
static

Definition at line 149 of file privatesend.cpp.

Referenced by AppInit2().

◆ IsCollateralValid()

bool CPrivateSend::IsCollateralValid ( const CTransaction txCollateral)
static

If the collateral is valid given by a client.

Definition at line 174 of file privatesend.cpp.

Referenced by CPrivateSendServer::AddEntry(), CPrivateSendClient::DoAutomaticDenominating(), and CPrivateSendServer::IsAcceptableDenomAndCollateral().

◆ operator=()

CPrivateSend& CPrivateSend::operator= ( CPrivateSend const &  )
privatedelete

◆ SyncTransaction()

void CPrivateSend::SyncTransaction ( const CTransaction tx,
const CBlock pblock 
)
static

Definition at line 395 of file privatesend.cpp.

Referenced by CDSNotificationInterface::SyncTransaction().

Member Data Documentation

◆ COLLATERAL

const CAmount CPrivateSend::COLLATERAL = 0.001 * COIN
staticprivate

Definition at line 318 of file privatesend.h.

Referenced by GetCollateralAmount(), and GetMaxCollateralAmount().

◆ cs_mapdstx

CCriticalSection CPrivateSend::cs_mapdstx
staticprivate

Definition at line 324 of file privatesend.h.

Referenced by AddDSTX(), CheckDSTXes(), GetDSTX(), and SyncTransaction().

◆ mapDSTX

std::map< uint256, CDarksendBroadcastTx > CPrivateSend::mapDSTX
staticprivate

Definition at line 322 of file privatesend.h.

Referenced by AddDSTX(), CheckDSTXes(), GetDSTX(), and SyncTransaction().

◆ vecStandardDenominations

std::vector< CAmount > CPrivateSend::vecStandardDenominations
staticprivate

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