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

#include <quorums_dkgsessionmgr.h>

Collaboration diagram for llmq::CDKGSessionManager:
[legend]

Classes

struct  ContributionsCacheEntry
 
struct  ContributionsCacheKey
 

Public Member Functions

 CDKGSessionManager (CDBWrapper &_evoDb, CBLSWorker &_blsWorker)
 
 ~CDKGSessionManager ()
 
void StartThreads ()
 
void StopThreads ()
 
void UpdatedBlockTip (const CBlockIndex *pindexNew, bool fInitialDownload)
 
bool ProcessMessage (CNode *pfrom, const std::string &strCommand, CDataStream &vRecv)
 
bool AlreadyHave (const CInv &inv) const
 
bool GetContribution (const uint256 &hash, CDKGContribution &ret) const
 
bool GetComplaint (const uint256 &hash, CDKGComplaint &ret) const
 
bool GetJustification (const uint256 &hash, CDKGJustification &ret) const
 
bool GetPrematureCommitment (const uint256 &hash, CDKGPrematureCommitment &ret) const
 
void WriteVerifiedVvecContribution (Consensus::LLMQType llmqType, const CBlockIndex *pindexQuorum, const uint256 &proTxHash, const BLSVerificationVectorPtr &vvec)
 
void WriteVerifiedSkContribution (Consensus::LLMQType llmqType, const CBlockIndex *pindexQuorum, const uint256 &proTxHash, const CBLSSecretKey &skContribution)
 
bool GetVerifiedContributions (Consensus::LLMQType llmqType, const CBlockIndex *pindexQuorum, const std::vector< bool > &validMembers, std::vector< uint16_t > &memberIndexesRet, std::vector< BLSVerificationVectorPtr > &vvecsRet, BLSSecretKeyVector &skContributionsRet)
 
bool GetVerifiedContribution (Consensus::LLMQType llmqType, const CBlockIndex *pindexQuorum, const uint256 &proTxHash, BLSVerificationVectorPtr &vvecRet, CBLSSecretKey &skContributionRet)
 

Private Member Functions

void CleanupCache ()
 

Private Attributes

CDBWrapperllmqDb
 
CBLSWorkerblsWorker
 
std::map< Consensus::LLMQType, CDKGSessionHandlerdkgSessionHandlers
 
RecursiveMutex contributionsCacheCs
 
std::map< ContributionsCacheKey, ContributionsCacheEntrycontributionsCache
 

Static Private Attributes

static const int64_t MAX_CONTRIBUTION_CACHE_TIME = 60 * 1000
 

Detailed Description

Definition at line 18 of file quorums_dkgsessionmgr.h.

Constructor & Destructor Documentation

◆ CDKGSessionManager()

llmq::CDKGSessionManager::CDKGSessionManager ( CDBWrapper _evoDb,
CBLSWorker _blsWorker 
)

Definition at line 22 of file quorums_dkgsessionmgr.cpp.

Here is the call graph for this function:

◆ ~CDKGSessionManager()

llmq::CDKGSessionManager::~CDKGSessionManager ( )
inline

Definition at line 49 of file quorums_dkgsessionmgr.h.

Member Function Documentation

◆ AlreadyHave()

bool llmq::CDKGSessionManager::AlreadyHave ( const CInv inv) const

Definition at line 78 of file quorums_dkgsessionmgr.cpp.

◆ CleanupCache()

void llmq::CDKGSessionManager::CleanupCache ( )
private

Definition at line 224 of file quorums_dkgsessionmgr.cpp.

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

◆ GetComplaint()

bool llmq::CDKGSessionManager::GetComplaint ( const uint256 hash,
CDKGComplaint ret 
) const

Definition at line 109 of file quorums_dkgsessionmgr.cpp.

◆ GetContribution()

bool llmq::CDKGSessionManager::GetContribution ( const uint256 hash,
CDKGContribution ret 
) const

Definition at line 92 of file quorums_dkgsessionmgr.cpp.

◆ GetJustification()

bool llmq::CDKGSessionManager::GetJustification ( const uint256 hash,
CDKGJustification ret 
) const

Definition at line 126 of file quorums_dkgsessionmgr.cpp.

◆ GetPrematureCommitment()

bool llmq::CDKGSessionManager::GetPrematureCommitment ( const uint256 hash,
CDKGPrematureCommitment ret 
) const

Definition at line 143 of file quorums_dkgsessionmgr.cpp.

◆ GetVerifiedContribution()

bool llmq::CDKGSessionManager::GetVerifiedContribution ( Consensus::LLMQType  llmqType,
const CBlockIndex pindexQuorum,
const uint256 proTxHash,
BLSVerificationVectorPtr vvecRet,
CBLSSecretKey skContributionRet 
)

Definition at line 196 of file quorums_dkgsessionmgr.cpp.

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

◆ GetVerifiedContributions()

bool llmq::CDKGSessionManager::GetVerifiedContributions ( Consensus::LLMQType  llmqType,
const CBlockIndex pindexQuorum,
const std::vector< bool > &  validMembers,
std::vector< uint16_t > &  memberIndexesRet,
std::vector< BLSVerificationVectorPtr > &  vvecsRet,
BLSSecretKeyVector skContributionsRet 
)

Definition at line 170 of file quorums_dkgsessionmgr.cpp.

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

◆ ProcessMessage()

bool llmq::CDKGSessionManager::ProcessMessage ( CNode pfrom,
const std::string &  strCommand,
CDataStream vRecv 
)

Definition at line 62 of file quorums_dkgsessionmgr.cpp.

Here is the call graph for this function:

◆ StartThreads()

void llmq::CDKGSessionManager::StartThreads ( )

Definition at line 32 of file quorums_dkgsessionmgr.cpp.

◆ StopThreads()

void llmq::CDKGSessionManager::StopThreads ( )

Definition at line 39 of file quorums_dkgsessionmgr.cpp.

◆ UpdatedBlockTip()

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

Definition at line 46 of file quorums_dkgsessionmgr.cpp.

Here is the call graph for this function:

◆ WriteVerifiedSkContribution()

void llmq::CDKGSessionManager::WriteVerifiedSkContribution ( Consensus::LLMQType  llmqType,
const CBlockIndex pindexQuorum,
const uint256 proTxHash,
const CBLSSecretKey skContribution 
)

Definition at line 165 of file quorums_dkgsessionmgr.cpp.

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

◆ WriteVerifiedVvecContribution()

void llmq::CDKGSessionManager::WriteVerifiedVvecContribution ( Consensus::LLMQType  llmqType,
const CBlockIndex pindexQuorum,
const uint256 proTxHash,
const BLSVerificationVectorPtr vvec 
)

Definition at line 160 of file quorums_dkgsessionmgr.cpp.

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

Member Data Documentation

◆ blsWorker

CBLSWorker& llmq::CDKGSessionManager::blsWorker
private

Definition at line 24 of file quorums_dkgsessionmgr.h.

◆ contributionsCache

std::map<ContributionsCacheKey, ContributionsCacheEntry> llmq::CDKGSessionManager::contributionsCache
private

Definition at line 45 of file quorums_dkgsessionmgr.h.

◆ contributionsCacheCs

RecursiveMutex llmq::CDKGSessionManager::contributionsCacheCs
private

Definition at line 28 of file quorums_dkgsessionmgr.h.

◆ dkgSessionHandlers

std::map<Consensus::LLMQType, CDKGSessionHandler> llmq::CDKGSessionManager::dkgSessionHandlers
private

Definition at line 26 of file quorums_dkgsessionmgr.h.

◆ llmqDb

CDBWrapper& llmq::CDKGSessionManager::llmqDb
private

Definition at line 23 of file quorums_dkgsessionmgr.h.

◆ MAX_CONTRIBUTION_CACHE_TIME

const int64_t llmq::CDKGSessionManager::MAX_CONTRIBUTION_CACHE_TIME = 60 * 1000
staticprivate

Definition at line 20 of file quorums_dkgsessionmgr.h.


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