Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
quorums_instantsend.h
Go to the documentation of this file.
61 std::unordered_map<uint256, CInstantSendLockPtr> RemoveConfirmedInstantSendLocks(int nUntilHeight);
72 std::vector<uint256> RemoveChainedInstantSendLocks(const uint256& islockHash, const uint256& txid, int nHeight);
100 std::unordered_map<uint256, std::pair<NodeId, CInstantSendLock>, StaticSaltedHasher> pendingInstantSendLocks;
102 // TXs which are neither IS locked nor ChainLocked. We use this to determine for which TXs we need to retry IS locking
125 bool CheckCanLock(const COutPoint& outpoint, bool printDebug, const uint256& txHash, CAmount* retValue, const Consensus::Params& params);
136 void ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vRecv, CConnman& connman);
137 void ProcessMessageInstantSendLock(CNode* pfrom, const CInstantSendLock& islock, CConnman& connman);
140 std::unordered_set<uint256> ProcessPendingInstantSendLocks(int signOffset, const std::unordered_map<uint256, std::pair<NodeId, CInstantSendLock>, StaticSaltedHasher>& pend, bool ban);
144 void ProcessNewTransaction(const CTransactionRef& tx, const CBlockIndex* pindex, bool allowReSigning);
146 void BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindex, const std::vector<CTransactionRef>& vtxConflicted);
147 void BlockDisconnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexDisconnected);
void AddNonLockedTx(const CTransactionRef &tx, const CBlockIndex *pindexMined)
Definition: quorums_instantsend.cpp:1051
void UpdateWalletTransaction(const CTransactionRef &tx, const CInstantSendLock &islock)
Definition: quorums_instantsend.cpp:965
void InterruptWorkerThread()
Definition: quorums_instantsend.cpp:378
void RemoveInstantSendLockMined(const uint256 &hash, int nHeight)
Definition: quorums_instantsend.cpp:102
void TruncateRecoveredSigsForInputs(const CInstantSendLock &islock)
Definition: quorums_instantsend.cpp:1124
void ResolveBlockConflicts(const uint256 &islockHash, const CInstantSendLock &islock)
Definition: quorums_instantsend.cpp:1236
Definition: quorums_instantsend.h:43
void BlockDisconnected(const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindexDisconnected)
Definition: quorums_instantsend.cpp:1040
CInstantSendLockPtr GetInstantSendLockByInput(const COutPoint &outpoint)
Definition: quorums_instantsend.cpp:254
void TransactionAddedToMempool(const CTransactionRef &tx)
Definition: quorums_instantsend.cpp:1017
unordered_lru_cache< uint256, uint256, StaticSaltedHasher, 10000 > txidCache
Definition: quorums_instantsend.h:49
bool AlreadyHave(const CInv &inv)
Definition: quorums_instantsend.cpp:1428
void ProcessNewTransaction(const CTransactionRef &tx, const CBlockIndex *pindex, bool allowReSigning)
Definition: quorums_instantsend.cpp:976
CInstantSendDb(CDBWrapper &_db)
Definition: quorums_instantsend.h:53
Definition: dbwrapper.h:197
void HandleNewInputLockRecoveredSig(const CRecoveredSig &recoveredSig, const uint256 &txid)
Definition: quorums_instantsend.cpp:582
void TrySignInstantSendLock(const CTransaction &tx)
Definition: quorums_instantsend.cpp:604
void ProcessMessageInstantSendLock(CNode *pfrom, const CInstantSendLock &islock, CConnman &connman)
Definition: quorums_instantsend.cpp:681
Double ended buffer combining vector and stream-like interfaces.
Definition: streams.h:103
Definition: deterministicmns.h:26
bool ProcessPendingInstantSendLocks()
Definition: quorums_instantsend.cpp:728
Definition: saltedhasher.h:64
std::unordered_map< uint256, std::pair< NodeId, CInstantSendLock >, StaticSaltedHasher > pendingInstantSendLocks
Definition: quorums_instantsend.h:100
void RemoveConflictedTx(const CTransaction &tx)
Definition: quorums_instantsend.cpp:1113
void AskNodesForLockedTx(const uint256 &txid)
Definition: quorums_instantsend.cpp:1336
void WorkThreadMain()
Definition: quorums_instantsend.cpp:1504
CInstantSendManager * quorumInstantSendManager
Definition: quorums_instantsend.cpp:40
Definition: quorums_instantsend.h:20
bool GetInstantSendLockHashByTxid(const uint256 &txid, uint256 &ret)
Definition: quorums_instantsend.cpp:1453
bool HasArchivedInstantSendLock(const uint256 &islockHash)
Definition: quorums_instantsend.cpp:182
std::unordered_set< uint256, StaticSaltedHasher > inputRequestIds
Request ids of inputs that we signed.
Definition: quorums_instantsend.h:88
uint256 GetRequestId() const
Definition: quorums_instantsend.cpp:42
void RemoveChainLockConflictingLock(const uint256 &islockHash, const CInstantSendLock &islock)
Definition: quorums_instantsend.cpp:1318
#define ADD_SERIALIZE_METHODS
Implement three methods for serializable objects.
Definition: serialize.h:174
std::shared_ptr< CInstantSendLock > CInstantSendLockPtr
Definition: quorums_instantsend.h:41
bool IsLocked(const uint256 &txHash)
Definition: quorums_instantsend.cpp:1464
void ProcessInstantSendLock(NodeId from, const uint256 &hash, const CInstantSendLock &islock)
Definition: quorums_instantsend.cpp:884
void HandleFullyConfirmedBlock(const CBlockIndex *pindex)
Definition: quorums_instantsend.cpp:1158
std::unordered_map< uint256, NonLockedTxInfo, StaticSaltedHasher > nonLockedTxs
Definition: quorums_instantsend.h:109
CInstantSendLockPtr GetConflictingLock(const CTransaction &tx)
Definition: quorums_instantsend.cpp:1479
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: transaction.h:26
const CBlockIndex * pindexMined
Definition: quorums_instantsend.h:105
Definition: threadinterrupt.h:18
void WriteNewInstantSendLock(const uint256 &hash, const CInstantSendLock &islock)
Definition: quorums_instantsend.cpp:52
Definition: quorums_signing.h:21
bool GetInstantSendLockByHash(const uint256 &hash, CInstantSendLock &ret)
Definition: quorums_instantsend.cpp:1438
void UpdatedBlockTip(const CBlockIndex *pindexNew)
Definition: quorums_instantsend.cpp:1140
CInstantSendManager(CDBWrapper &_llmqDb)
Definition: quorums_instantsend.cpp:342
void NotifyChainLock(const CBlockIndex *pindexChainLock)
Definition: quorums_instantsend.cpp:1135
bool PreVerifyInstantSendLock(NodeId nodeId, const CInstantSendLock &islock, bool &retBan)
Definition: quorums_instantsend.cpp:708
void WriteInstantSendLockMined(const uint256 &hash, int nHeight)
Definition: quorums_instantsend.cpp:97
size_t GetInstantSendLockCount()
Definition: quorums_instantsend.cpp:1499
CInstantSendLockPtr GetInstantSendLockByHash(const uint256 &hash)
Definition: quorums_instantsend.cpp:209
std::vector< uint256 > GetInstantSendLocksByParent(const uint256 &parent)
Definition: quorums_instantsend.cpp:273
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:170
void RemoveNonLockedTx(const uint256 &txid, bool retryChildren)
Definition: quorums_instantsend.cpp:1075
std::unordered_map< uint256, CInstantSendLockPtr > RemoveConfirmedInstantSendLocks(int nUntilHeight)
Definition: quorums_instantsend.cpp:113
CThreadInterrupt workInterrupt
Definition: quorums_instantsend.h:82
CInstantSendLockPtr GetInstantSendLockByTxid(const uint256 &txid)
Definition: quorums_instantsend.cpp:245
uint256 GetInstantSendLockHashByTxid(const uint256 &txid)
Definition: quorums_instantsend.cpp:225
void RemoveArchivedInstantSendLocks(int nUntilHeight)
Definition: quorums_instantsend.cpp:153
void RemoveInstantSendLock(CDBBatch &batch, const uint256 &hash, CInstantSendLockPtr islock)
Definition: quorums_instantsend.cpp:70
bool ProcessTx(const CTransaction &tx, bool allowReSigning, const Consensus::Params ¶ms)
Definition: quorums_instantsend.cpp:383
void HandleNewInstantSendLockRecoveredSig(const CRecoveredSig &recoveredSig)
Definition: quorums_instantsend.cpp:642
void WriteInstantSendLockArchived(CDBBatch &batch, const uint256 &hash, int nHeight)
Definition: quorums_instantsend.cpp:107
void RemoveMempoolConflictsForLock(const uint256 &hash, const CInstantSendLock &islock)
Definition: quorums_instantsend.cpp:1200
size_t GetInstantSendLockCount()
Definition: quorums_instantsend.cpp:187
~CInstantSendManager()
Definition: quorums_instantsend.cpp:348
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:198
std::unordered_map< uint256, CInstantSendLock, StaticSaltedHasher > creatingInstantSendLocks
These are the islocks that are currently in the middle of being created.
Definition: quorums_instantsend.h:95
CTransactionRef tx
Definition: quorums_instantsend.h:106
std::unordered_set< uint256, StaticSaltedHasher > children
Definition: quorums_instantsend.h:107
bool CheckCanLock(const CTransaction &tx, bool printDebug, const Consensus::Params ¶ms)
Definition: quorums_instantsend.cpp:481
std::unordered_set< uint256, StaticSaltedHasher > pendingRetryTxs
Definition: quorums_instantsend.h:112
void BlockConnected(const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindex, const std::vector< CTransactionRef > &vtxConflicted)
Definition: quorums_instantsend.cpp:1022
void ProcessMessage(CNode *pfrom, const std::string &strCommand, CDataStream &vRecv, CConnman &connman)
Definition: quorums_instantsend.cpp:668
bool ProcessPendingRetryLockTxs()
Definition: quorums_instantsend.cpp:1361
ADD_SERIALIZE_METHODS void SerializationOp(Stream &s, Operation ser_action)
Definition: quorums_instantsend.h:31
Wrapped mutex: supports recursive locking, but no waiting TODO: We should move away from using the re...
Definition: sync.h:94
std::unordered_map< uint256, CInstantSendLock *, StaticSaltedHasher > txToCreatingInstantSendLocks
Definition: quorums_instantsend.h:97
std::vector< uint256 > RemoveChainedInstantSendLocks(const uint256 &islockHash, const uint256 &txid, int nHeight)
Definition: quorums_instantsend.cpp:302
virtual void HandleNewRecoveredSig(const CRecoveredSig &recoveredSig)
Definition: quorums_instantsend.cpp:552
bool IsConflicted(const CTransaction &tx)
Definition: quorums_instantsend.cpp:1474
unordered_lru_cache< uint256, CInstantSendLockPtr, StaticSaltedHasher, 10000 > islockCache
Definition: quorums_instantsend.h:48
unordered_lru_cache< COutPoint, uint256, SaltedOutpointHasher, 10000 > outpointCache
Definition: quorums_instantsend.h:50
std::unordered_map< COutPoint, uint256, SaltedOutpointHasher > nonLockedTxsByOutpoints
Definition: quorums_instantsend.h:110