Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

Used to keep track of current status of mixing pool. More...

#include <privatesend-server.h>

+ Inheritance diagram for CPrivateSendServer:
+ Collaboration diagram for CPrivateSendServer:

Public Member Functions

 CPrivateSendServer ()
 
void ProcessMessage (CNode *pfrom, const std::string &strCommand, CDataStream &vRecv, CConnman &connman)
 
bool HasTimedOut ()
 
void CheckTimeout (CConnman &connman)
 
void CheckForCompleteQueue (CConnman &connman)
 
void DoMaintenance (CConnman &connman)
 
void GetJsonInfo (UniValue &obj) const
 
- Public Member Functions inherited from CPrivateSendBaseSession
 CPrivateSendBaseSession ()
 
int GetState () const
 
std::string GetStateString () const
 
int GetEntriesCount () const
 
- Public Member Functions inherited from CPrivateSendBaseManager
 CPrivateSendBaseManager ()
 
int GetQueueSize () const
 
bool GetQueueItemAndTry (CPrivateSendQueue &dsqRet)
 

Private Member Functions

bool AddEntry (CConnman &connman, const CPrivateSendEntry &entry, PoolMessage &nMessageIDRet)
 Add a clients entry to the pool. More...
 
bool AddScriptSig (const CTxIn &txin)
 Add signature to a txin. More...
 
void ChargeFees (CConnman &connman)
 Charge fees to bad actors (Charge clients a fee if they're abusive) More...
 
void ChargeRandomFees (CConnman &connman)
 Rarely charge fees to pay miners. More...
 
void ConsumeCollateral (CConnman &connman, const CTransactionRef &txref)
 Consume collateral in cases when peer misbehaved. More...
 
void CheckPool (CConnman &connman)
 Check for process. More...
 
void CreateFinalTransaction (CConnman &connman)
 
void CommitFinalTransaction (CConnman &connman)
 
bool IsAcceptableDSA (const CPrivateSendAccept &dsa, PoolMessage &nMessageIDRet)
 Is this nDenom and txCollateral acceptable? More...
 
bool CreateNewSession (const CPrivateSendAccept &dsa, PoolMessage &nMessageIDRet, CConnman &connman)
 
bool AddUserToExistingSession (const CPrivateSendAccept &dsa, PoolMessage &nMessageIDRet)
 
bool IsSessionReady ()
 Do we have enough users to take entries? More...
 
bool IsSignaturesComplete ()
 Check that all inputs are signed. (Are all inputs signed?) More...
 
bool IsInputScriptSigValid (const CTxIn &txin)
 Check to make sure a given input matches an input in the pool and its scriptSig is valid. More...
 
void SetState (PoolState nStateNew)
 
void RelayFinalTransaction (const CTransaction &txFinal, CConnman &connman)
 Relay mixing Messages. More...
 
void PushStatus (CNode *pnode, PoolStatusUpdate nStatusUpdate, PoolMessage nMessageID, CConnman &connman)
 
void RelayStatus (PoolStatusUpdate nStatusUpdate, CConnman &connman, PoolMessage nMessageID=MSG_NOERR)
 
void RelayCompletedTransaction (PoolMessage nMessageID, CConnman &connman)
 
void SetNull ()
 

Private Attributes

std::vector< CTransactionRefvecSessionCollaterals
 
bool fUnitTest
 

Additional Inherited Members

- Public Attributes inherited from CPrivateSendBaseSession
int nSessionDenom
 
- Protected Member Functions inherited from CPrivateSendBaseSession
void SetNull ()
 
bool IsValidInOuts (const std::vector< CTxIn > &vin, const std::vector< CTxOut > &vout, PoolMessage &nMessageIDRet, bool *fConsumeCollateralRet) const
 
- Protected Member Functions inherited from CPrivateSendBaseManager
void SetNull ()
 
void CheckQueue ()
 
- Protected Attributes inherited from CPrivateSendBaseSession
CCriticalSection cs_privatesend
 
std::vector< CPrivateSendEntryvecEntries
 
PoolState nState
 
int64_t nTimeLastSuccessfulStep
 
int nSessionID
 
CMutableTransaction finalMutableTransaction
 
- Protected Attributes inherited from CPrivateSendBaseManager
CCriticalSection cs_vecqueue
 
std::vector< CPrivateSendQueuevecPrivateSendQueue
 

Detailed Description

Used to keep track of current status of mixing pool.

Definition at line 19 of file privatesend-server.h.

Constructor & Destructor Documentation

◆ CPrivateSendServer()

CPrivateSendServer::CPrivateSendServer ( )
inline

Definition at line 70 of file privatesend-server.h.

Member Function Documentation

◆ AddEntry()

◆ AddScriptSig()

◆ AddUserToExistingSession()

◆ ChargeFees()

void CPrivateSendServer::ChargeFees ( CConnman connman)
private

◆ ChargeRandomFees()

void CPrivateSendServer::ChargeRandomFees ( CConnman connman)
private

Rarely charge fees to pay miners.

Definition at line 438 of file privatesend-server.cpp.

References ConsumeCollateral(), fMasternodeMode, GetRandInt(), LogPrint, BCLog::PRIVATESEND, and vecSessionCollaterals.

Referenced by CommitFinalTransaction().

◆ CheckForCompleteQueue()

◆ CheckPool()

◆ CheckTimeout()

◆ CommitFinalTransaction()

◆ ConsumeCollateral()

void CPrivateSendServer::ConsumeCollateral ( CConnman connman,
const CTransactionRef txref 
)
private

Consume collateral in cases when peer misbehaved.

Definition at line 449 of file privatesend-server.cpp.

References AcceptToMemoryPool(), cs_main, LOCK, LogPrint, mempool, BCLog::PRIVATESEND, and CConnman::RelayTransaction().

Referenced by AddEntry(), ChargeFees(), and ChargeRandomFees().

◆ CreateFinalTransaction()

◆ CreateNewSession()

◆ DoMaintenance()

void CPrivateSendServer::DoMaintenance ( CConnman connman)

◆ GetJsonInfo()

◆ HasTimedOut()

◆ IsAcceptableDSA()

bool CPrivateSendServer::IsAcceptableDSA ( const CPrivateSendAccept dsa,
PoolMessage nMessageIDRet 
)
private

◆ IsInputScriptSigValid()

bool CPrivateSendServer::IsInputScriptSigValid ( const CTxIn txin)
private

◆ IsSessionReady()

◆ IsSignaturesComplete()

bool CPrivateSendServer::IsSignaturesComplete ( )
private

Check that all inputs are signed. (Are all inputs signed?)

Definition at line 653 of file privatesend-server.cpp.

References CPrivateSendBaseSession::vecEntries.

Referenced by CheckPool().

◆ ProcessMessage()

◆ PushStatus()

void CPrivateSendServer::PushStatus ( CNode pnode,
PoolStatusUpdate  nStatusUpdate,
PoolMessage  nMessageID,
CConnman connman 
)
private

◆ RelayCompletedTransaction()

◆ RelayFinalTransaction()

void CPrivateSendServer::RelayFinalTransaction ( const CTransaction txFinal,
CConnman connman 
)
private

◆ RelayStatus()

◆ SetNull()

void CPrivateSendServer::SetNull ( )
private

◆ SetState()

Member Data Documentation

◆ fUnitTest

bool CPrivateSendServer::fUnitTest
private

Definition at line 26 of file privatesend-server.h.

Referenced by CreateNewSession(), and IsAcceptableDSA().

◆ vecSessionCollaterals

std::vector<CTransactionRef> CPrivateSendServer::vecSessionCollaterals
private

The documentation for this class was generated from the following files:
Released under the MIT license