![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#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, CTxLockRequest > | mapLockRequestAccepted |
std::map< uint256, CTxLockRequest > | mapLockRequestRejected |
std::map< uint256, CTxLockVote > | mapTxLockVotes |
std::map< uint256, CTxLockVote > | mapTxLockVotesOrphan |
std::map< uint256, CTxLockCandidate > | mapTxLockCandidates |
std::map< COutPoint, std::set< uint256 > > | mapVotedOutpoints |
std::map< COutPoint, uint256 > | mapLockedOutpoints |
std::map< COutPoint, int64_t > | mapMasternodeOrphanVotes |
Definition at line 44 of file instantx.h.
void CInstantSend::AcceptLockRequest | ( | const CTxLockRequest & | txLockRequest | ) |
Definition at line 718 of file instantx.cpp.
Referenced by ProcessMessage().
bool CInstantSend::AlreadyHave | ( | const uint256 & | hash | ) |
Definition at line 710 of file instantx.cpp.
Referenced by AlreadyHave().
void CInstantSend::CheckAndRemove | ( | ) |
Definition at line 631 of file instantx.cpp.
Referenced by ResolveConflicts(), and ThreadCheckPrivateSend().
|
private |
Definition at line 169 of file instantx.cpp.
Referenced by ProcessTxLockVote().
|
private |
Definition at line 131 of file instantx.cpp.
Referenced by ProcessTxLockRequest().
|
private |
Definition at line 614 of file instantx.cpp.
Referenced by ProcessTxLockVote().
int CInstantSend::GetConfirmations | ( | const uint256 & | nTXHash | ) |
Definition at line 811 of file instantx.cpp.
Referenced by CGovernanceObject::IsCollateralValid().
Definition at line 530 of file instantx.cpp.
Referenced by AcceptToMemoryPoolWorker(), CheckBlock(), IsLockedInstantSendTransaction(), and ResolveConflicts().
int CInstantSend::GetTransactionLockSignatures | ( | const uint256 & | txHash | ) |
Definition at line 795 of file instantx.cpp.
Referenced by TransactionDesc::FormatTxStatus().
bool CInstantSend::GetTxLockRequest | ( | const uint256 & | txHash, |
CTxLockRequest & | txLockRequestRet | ||
) |
Definition at line 736 of file instantx.cpp.
Referenced by HasTxLockRequest(), ProcessGetData(), and CConnman::RelayTransaction().
bool CInstantSend::GetTxLockVote | ( | const uint256 & | hash, |
CTxLockVote & | txLockVoteRet | ||
) |
Definition at line 747 of file instantx.cpp.
Referenced by ProcessGetData().
bool CInstantSend::HasTxLockRequest | ( | const uint256 & | txHash | ) |
Definition at line 730 of file instantx.cpp.
Referenced by AcceptToMemoryPoolWorker(), TransactionDesc::FormatTxStatus(), and CConnman::RelayTransaction().
|
private |
Definition at line 427 of file instantx.cpp.
Referenced by ProcessTxLockVote().
|
private |
Definition at line 440 of file instantx.cpp.
Referenced by IsEnoughOrphanVotesForTx().
|
private |
Definition at line 758 of file instantx.cpp.
bool CInstantSend::IsLockedInstantSendTransaction | ( | const uint256 & | txHash | ) |
Definition at line 770 of file instantx.cpp.
Referenced by TransactionDesc::FormatTxStatus(), GetConfirmations(), CMerkleTx::GetDepthInMainChain(), CTxLockVote::IsFailed(), TryToFinalizeLockCandidate(), UpdateLockedTransaction(), and WalletTxToJSON().
bool CInstantSend::IsTxLockCandidateTimedOut | ( | const uint256 & | txHash | ) |
Definition at line 816 of file instantx.cpp.
Referenced by TransactionDesc::FormatTxStatus().
|
private |
Definition at line 511 of file instantx.cpp.
Referenced by TryToFinalizeLockCandidate().
void CInstantSend::ProcessMessage | ( | CNode * | pfrom, |
std::string & | strCommand, | ||
CDataStream & | vRecv, | ||
CConnman & | connman | ||
) |
Definition at line 43 of file instantx.cpp.
Referenced by ProcessMessage().
|
private |
Definition at line 408 of file instantx.cpp.
Referenced by ProcessTxLockRequest().
bool CInstantSend::ProcessTxLockRequest | ( | const CTxLockRequest & | txLockRequest, |
CConnman & | connman | ||
) |
Definition at line 80 of file instantx.cpp.
Referenced by ProcessMessage(), ProcessTxLockVote(), CWalletTx::RelayWalletTransaction(), and sendrawtransaction().
|
private |
Definition at line 278 of file instantx.cpp.
Referenced by ProcessMessage(), and ProcessOrphanTxLockVotes().
void CInstantSend::RejectLockRequest | ( | const CTxLockRequest & | txLockRequest | ) |
Definition at line 724 of file instantx.cpp.
Referenced by ProcessMessage().
Definition at line 831 of file instantx.cpp.
|
private |
Definition at line 539 of file instantx.cpp.
Referenced by TryToFinalizeLockCandidate().
void CInstantSend::SyncTransaction | ( | const CTransaction & | tx, |
const CBlock * | pblock | ||
) |
Definition at line 846 of file instantx.cpp.
Referenced by CDSNotificationInterface::SyncTransaction().
std::string CInstantSend::ToString | ( | ) |
Definition at line 912 of file instantx.cpp.
Referenced by CheckAndRemove().
|
private |
Definition at line 458 of file instantx.cpp.
Referenced by ProcessTxLockRequest(), and ProcessTxLockVote().
void CInstantSend::UpdatedBlockTip | ( | const CBlockIndex * | pindex | ) |
Definition at line 841 of file instantx.cpp.
Referenced by CDSNotificationInterface::UpdatedBlockTip().
|
private |
Definition at line 480 of file instantx.cpp.
Referenced by TryToFinalizeLockCandidate().
|
private |
Definition at line 178 of file instantx.cpp.
Referenced by ProcessTxLockRequest().
CCriticalSection CInstantSend::cs_instantsend |
Definition at line 84 of file instantx.h.
Referenced by AcceptLockRequest(), AlreadyHave(), CheckAndRemove(), CreateTxLockCandidate(), GetAverageMasternodeOrphanVoteTime(), GetLockedOutPointTxHash(), GetTransactionLockSignatures(), GetTxLockRequest(), GetTxLockVote(), IsEnoughOrphanVotesForTxAndOutPoint(), IsInstantSendReadyToLock(), IsLockedInstantSendTransaction(), IsTxLockCandidateTimedOut(), LockTransactionInputs(), ProcessMessage(), ProcessOrphanTxLockVotes(), ProcessTxLockRequest(), ProcessTxLockVote(), RejectLockRequest(), Relay(), ResolveConflicts(), SyncTransaction(), ToString(), TryToFinalizeLockCandidate(), UpdateLockedTransaction(), and Vote().
Definition at line 59 of file instantx.h.
Referenced by CheckAndRemove(), GetLockedOutPointTxHash(), LockTransactionInputs(), and ProcessTxLockRequest().
|
private |
Definition at line 51 of file instantx.h.
Referenced by AcceptLockRequest(), AlreadyHave(), CheckAndRemove(), and ProcessTxLockVote().
|
private |
Definition at line 52 of file instantx.h.
Referenced by AlreadyHave(), CheckAndRemove(), ProcessTxLockVote(), RejectLockRequest(), and ResolveConflicts().
|
private |
Definition at line 62 of file instantx.h.
Referenced by CheckAndRemove(), GetAverageMasternodeOrphanVoteTime(), and ProcessTxLockVote().
|
private |
Definition at line 56 of file instantx.h.
Referenced by CheckAndRemove(), CreateEmptyTxLockCandidate(), CreateTxLockCandidate(), GetTransactionLockSignatures(), GetTxLockRequest(), IsInstantSendReadyToLock(), IsLockedInstantSendTransaction(), IsTxLockCandidateTimedOut(), ProcessTxLockRequest(), ProcessTxLockVote(), Relay(), ResolveConflicts(), SyncTransaction(), ToString(), and Vote().
|
private |
Definition at line 53 of file instantx.h.
Referenced by AlreadyHave(), CheckAndRemove(), GetTxLockVote(), ProcessMessage(), SyncTransaction(), ToString(), and Vote().
|
private |
Definition at line 54 of file instantx.h.
Referenced by CheckAndRemove(), IsEnoughOrphanVotesForTxAndOutPoint(), ProcessOrphanTxLockVotes(), ProcessTxLockVote(), and SyncTransaction().
Definition at line 58 of file instantx.h.
Referenced by CheckAndRemove(), ProcessTxLockRequest(), ProcessTxLockVote(), and Vote().
|
private |
Definition at line 48 of file instantx.h.
Referenced by CheckAndRemove(), and UpdatedBlockTip().