PIVX Core  5.6.99
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | List of all members
llmq::CQuorumManager Class Reference

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

#include <quorums.h>

Collaboration diagram for llmq::CQuorumManager:
[legend]

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 *pindexQuorum)
 

Private Attributes

CEvoDBevoDb
 
CBLSWorkerblsWorker
 
CDKGSessionManagerdkgManager
 
RecursiveMutex quorumsCacheCs
 
std::map< Consensus::LLMQType, unordered_lru_cache< uint256, CQuorumCPtr, StaticSaltedHasher > > mapQuorumsCache
 
std::map< Consensus::LLMQType, unordered_lru_cache< uint256, std::vector< CQuorumCPtr >, StaticSaltedHasher > > 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 intra-quorum connections for new quorums.

Definition at line 80 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.

Here is the call graph for this function:

Member Function Documentation

◆ BuildQuorumContributions()

bool llmq::CQuorumManager::BuildQuorumContributions ( const CFinalCommitment fqc,
std::shared_ptr< CQuorum > &  quorum 
) const
private

Definition at line 212 of file quorums.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildQuorumFromCommitment()

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

Definition at line 182 of file quorums.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnsureQuorumConnections()

void llmq::CQuorumManager::EnsureQuorumConnections ( Consensus::LLMQType  llmqType,
const CBlockIndex pindexNew 
)
private

◆ GetQuorum() [1/2]

CQuorumCPtr llmq::CQuorumManager::GetQuorum ( Consensus::LLMQType  llmqType,
const CBlockIndex pindexQuorum 
)
private

Definition at line 333 of file quorums.cpp.

Here is the call graph for this function:

◆ GetQuorum() [2/2]

CQuorumCPtr llmq::CQuorumManager::GetQuorum ( Consensus::LLMQType  llmqType,
const uint256 quorumHash 
)

Definition at line 318 of file quorums.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasQuorum()

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

Definition at line 248 of file quorums.cpp.

Here is the caller graph for this function:

◆ ScanQuorums() [1/2]

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

Definition at line 259 of file quorums.cpp.

Here is the call graph for this function:

◆ ScanQuorums() [2/2]

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

Definition at line 253 of file quorums.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdatedBlockTip()

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

Definition at line 166 of file quorums.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ blsWorker

CBLSWorker& llmq::CQuorumManager::blsWorker
private

Definition at line 84 of file quorums.h.

◆ dkgManager

CDKGSessionManager& llmq::CQuorumManager::dkgManager
private

Definition at line 85 of file quorums.h.

◆ evoDb

CEvoDB& llmq::CQuorumManager::evoDb
private

Definition at line 83 of file quorums.h.

◆ mapQuorumsCache

std::map<Consensus::LLMQType, unordered_lru_cache<uint256, CQuorumCPtr, StaticSaltedHasher> > llmq::CQuorumManager::mapQuorumsCache
mutableprivate

Definition at line 88 of file quorums.h.

◆ quorumsCacheCs

RecursiveMutex llmq::CQuorumManager::quorumsCacheCs
private

Definition at line 87 of file quorums.h.

◆ scanQuorumsCache

std::map<Consensus::LLMQType, unordered_lru_cache<uint256, std::vector<CQuorumCPtr>, StaticSaltedHasher> > llmq::CQuorumManager::scanQuorumsCache
mutableprivate

Definition at line 89 of file quorums.h.


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