Dash Core  0.12.2.1
P2P Digital Currency
CInstantSend Class Reference

#include <instantx.h>

Public Member Functions

void ProcessMessage (CNode *pfrom, std::string &strCommand, CDataStream &vRecv, CConnman &connman)
 
bool ProcessTxLockRequest (const CTxLockRequest &txLockRequest, CConnman &connman)
 
bool AlreadyHave (const uint256 &hash)
 
void AcceptLockRequest (const CTxLockRequest &txLockRequest)
 
void RejectLockRequest (const CTxLockRequest &txLockRequest)
 
bool HasTxLockRequest (const uint256 &txHash)
 
bool GetTxLockRequest (const uint256 &txHash, CTxLockRequest &txLockRequestRet)
 
bool GetTxLockVote (const uint256 &hash, CTxLockVote &txLockVoteRet)
 
bool GetLockedOutPointTxHash (const COutPoint &outpoint, uint256 &hashRet)
 
bool IsLockedInstantSendTransaction (const uint256 &txHash)
 
int GetTransactionLockSignatures (const uint256 &txHash)
 
int GetConfirmations (const uint256 &nTXHash)
 
void CheckAndRemove ()
 
bool IsTxLockCandidateTimedOut (const uint256 &txHash)
 
void Relay (const uint256 &txHash, CConnman &connman)
 
void UpdatedBlockTip (const CBlockIndex *pindex)
 
void SyncTransaction (const CTransaction &tx, const CBlock *pblock)
 
std::string ToString ()
 

Public Attributes

CCriticalSection cs_instantsend
 

Private Member Functions

bool CreateTxLockCandidate (const CTxLockRequest &txLockRequest)
 
void CreateEmptyTxLockCandidate (const uint256 &txHash)
 
void Vote (CTxLockCandidate &txLockCandidate, CConnman &connman)
 
bool ProcessTxLockVote (CNode *pfrom, CTxLockVote &vote, CConnman &connman)
 
void ProcessOrphanTxLockVotes (CConnman &connman)
 
bool IsEnoughOrphanVotesForTx (const CTxLockRequest &txLockRequest)
 
bool IsEnoughOrphanVotesForTxAndOutPoint (const uint256 &txHash, const COutPoint &outpoint)
 
int64_t GetAverageMasternodeOrphanVoteTime ()
 
void TryToFinalizeLockCandidate (const CTxLockCandidate &txLockCandidate)
 
void LockTransactionInputs (const CTxLockCandidate &txLockCandidate)
 
void UpdateLockedTransaction (const CTxLockCandidate &txLockCandidate)
 
bool ResolveConflicts (const CTxLockCandidate &txLockCandidate)
 
bool IsInstantSendReadyToLock (const uint256 &txHash)
 

Private Attributes

int nCachedBlockHeight
 
std::map< uint256, CTxLockRequestmapLockRequestAccepted
 
std::map< uint256, CTxLockRequestmapLockRequestRejected
 
std::map< uint256, CTxLockVotemapTxLockVotes
 
std::map< uint256, CTxLockVotemapTxLockVotesOrphan
 
std::map< uint256, CTxLockCandidatemapTxLockCandidates
 
std::map< COutPoint, std::set< uint256 > > mapVotedOutpoints
 
std::map< COutPoint, uint256mapLockedOutpoints
 
std::map< COutPoint, int64_t > mapMasternodeOrphanVotes
 

Detailed Description

Definition at line 44 of file instantx.h.

Member Function Documentation

◆ AcceptLockRequest()

void CInstantSend::AcceptLockRequest ( const CTxLockRequest txLockRequest)

Definition at line 718 of file instantx.cpp.

Referenced by ProcessMessage().

◆ AlreadyHave()

bool CInstantSend::AlreadyHave ( const uint256 hash)

Definition at line 710 of file instantx.cpp.

Referenced by AlreadyHave().

◆ CheckAndRemove()

void CInstantSend::CheckAndRemove ( )

Definition at line 631 of file instantx.cpp.

Referenced by ResolveConflicts(), and ThreadCheckPrivateSend().

◆ CreateEmptyTxLockCandidate()

void CInstantSend::CreateEmptyTxLockCandidate ( const uint256 txHash)
private

Definition at line 169 of file instantx.cpp.

Referenced by ProcessTxLockVote().

◆ CreateTxLockCandidate()

bool CInstantSend::CreateTxLockCandidate ( const CTxLockRequest txLockRequest)
private

Definition at line 131 of file instantx.cpp.

Referenced by ProcessTxLockRequest().

◆ GetAverageMasternodeOrphanVoteTime()

int64_t CInstantSend::GetAverageMasternodeOrphanVoteTime ( )
private

Definition at line 614 of file instantx.cpp.

Referenced by ProcessTxLockVote().

◆ GetConfirmations()

int CInstantSend::GetConfirmations ( const uint256 nTXHash)

Definition at line 811 of file instantx.cpp.

Referenced by CGovernanceObject::IsCollateralValid().

◆ GetLockedOutPointTxHash()

bool CInstantSend::GetLockedOutPointTxHash ( const COutPoint outpoint,
uint256 hashRet 
)

◆ GetTransactionLockSignatures()

int CInstantSend::GetTransactionLockSignatures ( const uint256 txHash)

Definition at line 795 of file instantx.cpp.

Referenced by TransactionDesc::FormatTxStatus().

◆ GetTxLockRequest()

bool CInstantSend::GetTxLockRequest ( const uint256 txHash,
CTxLockRequest txLockRequestRet 
)

Definition at line 736 of file instantx.cpp.

Referenced by HasTxLockRequest(), ProcessGetData(), and CConnman::RelayTransaction().

◆ GetTxLockVote()

bool CInstantSend::GetTxLockVote ( const uint256 hash,
CTxLockVote txLockVoteRet 
)

Definition at line 747 of file instantx.cpp.

Referenced by ProcessGetData().

◆ HasTxLockRequest()

bool CInstantSend::HasTxLockRequest ( const uint256 txHash)

◆ IsEnoughOrphanVotesForTx()

bool CInstantSend::IsEnoughOrphanVotesForTx ( const CTxLockRequest txLockRequest)
private

Definition at line 427 of file instantx.cpp.

Referenced by ProcessTxLockVote().

◆ IsEnoughOrphanVotesForTxAndOutPoint()

bool CInstantSend::IsEnoughOrphanVotesForTxAndOutPoint ( const uint256 txHash,
const COutPoint outpoint 
)
private

Definition at line 440 of file instantx.cpp.

Referenced by IsEnoughOrphanVotesForTx().

◆ IsInstantSendReadyToLock()

bool CInstantSend::IsInstantSendReadyToLock ( const uint256 txHash)
private

Definition at line 758 of file instantx.cpp.

◆ IsLockedInstantSendTransaction()

bool CInstantSend::IsLockedInstantSendTransaction ( const uint256 txHash)

◆ IsTxLockCandidateTimedOut()

bool CInstantSend::IsTxLockCandidateTimedOut ( const uint256 txHash)

Definition at line 816 of file instantx.cpp.

Referenced by TransactionDesc::FormatTxStatus().

◆ LockTransactionInputs()

void CInstantSend::LockTransactionInputs ( const CTxLockCandidate txLockCandidate)
private

Definition at line 511 of file instantx.cpp.

Referenced by TryToFinalizeLockCandidate().

◆ ProcessMessage()

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

Definition at line 43 of file instantx.cpp.

Referenced by ProcessMessage().

◆ ProcessOrphanTxLockVotes()

void CInstantSend::ProcessOrphanTxLockVotes ( CConnman connman)
private

Definition at line 408 of file instantx.cpp.

Referenced by ProcessTxLockRequest().

◆ ProcessTxLockRequest()

bool CInstantSend::ProcessTxLockRequest ( const CTxLockRequest txLockRequest,
CConnman connman 
)

◆ ProcessTxLockVote()

bool CInstantSend::ProcessTxLockVote ( CNode pfrom,
CTxLockVote vote,
CConnman connman 
)
private

Definition at line 278 of file instantx.cpp.

Referenced by ProcessMessage(), and ProcessOrphanTxLockVotes().

◆ RejectLockRequest()

void CInstantSend::RejectLockRequest ( const CTxLockRequest txLockRequest)

Definition at line 724 of file instantx.cpp.

Referenced by ProcessMessage().

◆ Relay()

void CInstantSend::Relay ( const uint256 txHash,
CConnman connman 
)

Definition at line 831 of file instantx.cpp.

◆ ResolveConflicts()

bool CInstantSend::ResolveConflicts ( const CTxLockCandidate txLockCandidate)
private

Definition at line 539 of file instantx.cpp.

Referenced by TryToFinalizeLockCandidate().

◆ SyncTransaction()

void CInstantSend::SyncTransaction ( const CTransaction tx,
const CBlock pblock 
)

Definition at line 846 of file instantx.cpp.

Referenced by CDSNotificationInterface::SyncTransaction().

◆ ToString()

std::string CInstantSend::ToString ( )

Definition at line 912 of file instantx.cpp.

Referenced by CheckAndRemove().

◆ TryToFinalizeLockCandidate()

void CInstantSend::TryToFinalizeLockCandidate ( const CTxLockCandidate txLockCandidate)
private

Definition at line 458 of file instantx.cpp.

Referenced by ProcessTxLockRequest(), and ProcessTxLockVote().

◆ UpdatedBlockTip()

void CInstantSend::UpdatedBlockTip ( const CBlockIndex pindex)

Definition at line 841 of file instantx.cpp.

Referenced by CDSNotificationInterface::UpdatedBlockTip().

◆ UpdateLockedTransaction()

void CInstantSend::UpdateLockedTransaction ( const CTxLockCandidate txLockCandidate)
private

Definition at line 480 of file instantx.cpp.

Referenced by TryToFinalizeLockCandidate().

◆ Vote()

void CInstantSend::Vote ( CTxLockCandidate txLockCandidate,
CConnman connman 
)
private

Definition at line 178 of file instantx.cpp.

Referenced by ProcessTxLockRequest().

Member Data Documentation

◆ cs_instantsend

◆ mapLockedOutpoints

std::map<COutPoint, uint256> CInstantSend::mapLockedOutpoints
private

◆ mapLockRequestAccepted

std::map<uint256, CTxLockRequest> CInstantSend::mapLockRequestAccepted
private

Definition at line 51 of file instantx.h.

Referenced by AcceptLockRequest(), AlreadyHave(), CheckAndRemove(), and ProcessTxLockVote().

◆ mapLockRequestRejected

std::map<uint256, CTxLockRequest> CInstantSend::mapLockRequestRejected
private

◆ mapMasternodeOrphanVotes

std::map<COutPoint, int64_t> CInstantSend::mapMasternodeOrphanVotes
private

◆ mapTxLockCandidates

◆ mapTxLockVotes

std::map<uint256, CTxLockVote> CInstantSend::mapTxLockVotes
private

◆ mapTxLockVotesOrphan

std::map<uint256, CTxLockVote> CInstantSend::mapTxLockVotesOrphan
private

◆ mapVotedOutpoints

std::map<COutPoint, std::set<uint256> > CInstantSend::mapVotedOutpoints
private

Definition at line 58 of file instantx.h.

Referenced by CheckAndRemove(), ProcessTxLockRequest(), ProcessTxLockVote(), and Vote().

◆ nCachedBlockHeight

int CInstantSend::nCachedBlockHeight
private

Definition at line 48 of file instantx.h.

Referenced by CheckAndRemove(), and UpdatedBlockTip().


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