Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

The quorum manager maintains quorums which were mined on chain. More...

#include <quorums.h>

+ Collaboration diagram for llmq::CQuorumManager:

Public Member Functions

 CQuorumManager (CEvoDB &_evoDb, CBLSWorker &_blsWorker, CDKGSessionManager &_dkgManager)
 
void UpdatedBlockTip (const CBlockIndex *pindexNew, bool fInitialDownload)
 
bool HasQuorum (Consensus::LLMQType llmqType, const uint256 &quorumHash)
 
CQuorumCPtr GetQuorum (Consensus::LLMQType llmqType, const uint256 &quorumHash)
 
std::vector< CQuorumCPtrScanQuorums (Consensus::LLMQType llmqType, size_t maxCount)
 
std::vector< CQuorumCPtrScanQuorums (Consensus::LLMQType llmqType, const CBlockIndex *pindexStart, size_t maxCount)
 

Private Member Functions

void EnsureQuorumConnections (Consensus::LLMQType llmqType, const CBlockIndex *pindexNew)
 
bool BuildQuorumFromCommitment (const CFinalCommitment &qc, const CBlockIndex *pindexQuorum, const uint256 &minedBlockHash, std::shared_ptr< CQuorum > &quorum) const
 
bool BuildQuorumContributions (const CFinalCommitment &fqc, std::shared_ptr< CQuorum > &quorum) const
 
CQuorumCPtr GetQuorum (Consensus::LLMQType llmqType, const CBlockIndex *pindex)
 

Private Attributes

CEvoDBevoDb
 
CBLSWorkerblsWorker
 
CDKGSessionManagerdkgManager
 
CCriticalSection quorumsCacheCs
 
std::map< std::pair< Consensus::LLMQType, uint256 >, CQuorumPtrquorumsCache
 
unordered_lru_cache< std::pair< Consensus::LLMQType, uint256 >, std::vector< CQuorumCPtr >, StaticSaltedHasher, 32 > scanQuorumsCache
 

Detailed Description

The quorum manager maintains quorums which were mined on chain.

When a quorum is requested from the manager, it will lookup the commitment (through CQuorumBlockProcessor) and build a CQuorum object from it.

It is also responsible for initialization of the inter-quorum connections for new quorums.

Definition at line 81 of file quorums.h.

Constructor & Destructor Documentation

◆ CQuorumManager()

llmq::CQuorumManager::CQuorumManager ( CEvoDB _evoDb,
CBLSWorker _blsWorker,
CDKGSessionManager _dkgManager 
)

Definition at line 158 of file quorums.cpp.

Member Function Documentation

◆ BuildQuorumContributions()

◆ BuildQuorumFromCommitment()

bool llmq::CQuorumManager::BuildQuorumFromCommitment ( const CFinalCommitment qc,
const CBlockIndex pindexQuorum,
const uint256 minedBlockHash,
std::shared_ptr< CQuorum > &  quorum 
) const
private

◆ EnsureQuorumConnections()

◆ GetQuorum() [1/2]

◆ GetQuorum() [2/2]

◆ HasQuorum()

bool llmq::CQuorumManager::HasQuorum ( Consensus::LLMQType  llmqType,
const uint256 quorumHash 
)

◆ ScanQuorums() [1/2]

std::vector< CQuorumCPtr > llmq::CQuorumManager::ScanQuorums ( Consensus::LLMQType  llmqType,
size_t  maxCount 
)

◆ ScanQuorums() [2/2]

◆ UpdatedBlockTip()

void llmq::CQuorumManager::UpdatedBlockTip ( const CBlockIndex pindexNew,
bool  fInitialDownload 
)

Member Data Documentation

◆ blsWorker

CBLSWorker& llmq::CQuorumManager::blsWorker
private

Definition at line 85 of file quorums.h.

Referenced by BuildQuorumContributions(), and GetQuorum().

◆ dkgManager

CDKGSessionManager& llmq::CQuorumManager::dkgManager
private

Definition at line 86 of file quorums.h.

Referenced by BuildQuorumContributions().

◆ evoDb

CEvoDB& llmq::CQuorumManager::evoDb
private

Definition at line 84 of file quorums.h.

Referenced by BuildQuorumFromCommitment().

◆ quorumsCache

std::map<std::pair<Consensus::LLMQType, uint256>, CQuorumPtr> llmq::CQuorumManager::quorumsCache
private

Definition at line 89 of file quorums.h.

Referenced by GetQuorum().

◆ quorumsCacheCs

CCriticalSection llmq::CQuorumManager::quorumsCacheCs
private

Definition at line 88 of file quorums.h.

Referenced by GetQuorum(), and ScanQuorums().

◆ scanQuorumsCache

unordered_lru_cache<std::pair<Consensus::LLMQType, uint256>, std::vector<CQuorumCPtr>, StaticSaltedHasher, 32> llmq::CQuorumManager::scanQuorumsCache
private

Definition at line 90 of file quorums.h.

Referenced by ScanQuorums().


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