Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
quorums_chainlocks.h
Go to the documentation of this file.
52 // how long to wait for ixlocks until we consider a block with non-ixlocked TXs to be safe to sign
74 // We keep track of txids from recently received blocks so that we can check if all TXs got ixlocked
75 typedef std::unordered_map<uint256, std::shared_ptr<std::unordered_set<uint256, StaticSaltedHasher>>> BlockTxs;
94 void ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vRecv, CConnman& connman);
99 void BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindex, const std::vector<CTransactionRef>& vtxConflicted);
100 void BlockDisconnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexDisconnected);
void UpdatedBlockTip(const CBlockIndex *pindexNew)
Definition: quorums_chainlocks.cpp:206
void TransactionAddedToMempool(const CTransactionRef &tx, int64_t nAcceptTime)
Definition: quorums_chainlocks.cpp:364
CChainLockSig bestChainLock
Definition: quorums_chainlocks.h:64
void ProcessNewChainLock(NodeId from, const CChainLockSig &clsig, const uint256 &hash)
Definition: quorums_chainlocks.cpp:109
~CChainLocksHandler()
Definition: quorums_chainlocks.cpp:43
CChainLockSig bestChainLockWithKnownBlock
Definition: quorums_chainlocks.h:66
bool HasChainLock(int nHeight, const uint256 &blockHash)
Definition: quorums_chainlocks.cpp:608
void TrySignChainTip()
Definition: quorums_chainlocks.cpp:248
BlockTxs::mapped_type GetBlockTxs(const uint256 &blockHash)
Definition: quorums_chainlocks.cpp:413
uint256 bestChainLockHash
Definition: quorums_chainlocks.h:63
void EnforceBestChainLock()
Definition: quorums_chainlocks.cpp:491
void ProcessMessage(CNode *pfrom, const std::string &strCommand, CDataStream &vRecv, CConnman &connman)
Definition: quorums_chainlocks.cpp:93
Double ended buffer combining vector and stream-like interfaces.
Definition: streams.h:103
Definition: deterministicmns.h:26
uint256 lastSignedMsgHash
Definition: quorums_chainlocks.h:72
std::map< uint256, int64_t > seenChainLocks
Definition: quorums_chainlocks.h:79
bool tryLockChainTipScheduled
Definition: quorums_chainlocks.h:59
void CheckActiveState()
Definition: quorums_chainlocks.cpp:225
std::unordered_map< uint256, int64_t > txFirstSeenTime
Definition: quorums_chainlocks.h:77
static const int64_t WAIT_FOR_ISLOCK_TIMEOUT
Definition: quorums_chainlocks.h:53
uint256 lastSignedRequestId
Definition: quorums_chainlocks.h:71
bool IsTxSafeForMining(const uint256 &txid)
Definition: quorums_chainlocks.cpp:462
virtual void HandleNewRecoveredSig(const CRecoveredSig &recoveredSig)
Definition: quorums_chainlocks.cpp:564
boost::thread * scheduler_thread
Definition: quorums_chainlocks.h:57
bool InternalHasConflictingChainLock(int nHeight, const uint256 &blockHash)
Definition: quorums_chainlocks.cpp:644
#define ADD_SERIALIZE_METHODS
Implement three methods for serializable objects.
Definition: serialize.h:174
void BlockDisconnected(const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindexDisconnected)
Definition: quorums_chainlocks.cpp:407
Definition: bls.h:286
static const int64_t CLEANUP_SEEN_TIMEOUT
Definition: quorums_chainlocks.h:50
ADD_SERIALIZE_METHODS void SerializationOp(Stream &s, Operation ser_action)
Definition: quorums_chainlocks.h:36
Definition: quorums_signing.h:21
CChainLocksHandler()
Definition: quorums_chainlocks.cpp:36
static const int64_t CLEANUP_INTERVAL
Definition: quorums_chainlocks.h:49
const CBlockIndex * lastNotifyChainLockBlockIndex
Definition: quorums_chainlocks.h:68
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:170
void BlockConnected(const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindex, const std::vector< CTransactionRef > &vtxConflicted)
Definition: quorums_chainlocks.cpp:374
Definition: quorums_chainlocks.h:47
bool AlreadyHave(const CInv &inv)
Definition: quorums_chainlocks.cpp:68
bool HasConflictingChainLock(int nHeight, const uint256 &blockHash)
Definition: quorums_chainlocks.cpp:638
bool InternalHasChainLock(int nHeight, const uint256 &blockHash)
Definition: quorums_chainlocks.cpp:614
CChainLockSig GetBestChainLock()
Definition: quorums_chainlocks.cpp:87
Definition: quorums_chainlocks.h:25
Definition: scheduler.h:37
bool GetChainLockByHash(const uint256 &hash, CChainLockSig &ret)
Definition: quorums_chainlocks.cpp:74
std::unordered_map< uint256, std::shared_ptr< std::unordered_set< uint256, StaticSaltedHasher > > > BlockTxs
Definition: quorums_chainlocks.h:75
const CBlockIndex * bestChainLockBlockIndex
Definition: quorums_chainlocks.h:67
int32_t lastSignedHeight
Definition: quorums_chainlocks.h:70
void DoInvalidateBlock(const CBlockIndex *pindex)
Definition: quorums_chainlocks.cpp:591
Wrapped mutex: supports recursive locking, but no waiting TODO: We should move away from using the re...
Definition: sync.h:94
void AcceptedBlockHeader(const CBlockIndex *pindexNew)
Definition: quorums_chainlocks.cpp:184