PIVX Core  5.6.99
P2P Digital Currency
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TierTwoConnMan Class Reference

#include <net_masternodes.h>

Collaboration diagram for TierTwoConnMan:
[legend]

Classes

struct  Options
 

Public Member Functions

 TierTwoConnMan (CConnman *_connman)
 
 ~TierTwoConnMan ()
 
void setQuorumNodes (Consensus::LLMQType llmqType, const uint256 &quorumHash, const std::set< uint256 > &proTxHashes)
 
std::set< uint256getQuorumNodes (Consensus::LLMQType llmqType)
 
std::set< NodeIdgetQuorumNodes (Consensus::LLMQType llmqType, uint256 quorumHash)
 
bool hasQuorumNodes (Consensus::LLMQType llmqType, const uint256 &quorumHash)
 
void removeQuorumNodes (Consensus::LLMQType llmqType, const uint256 &quorumHash)
 
void setMasternodeQuorumRelayMembers (Consensus::LLMQType llmqType, const uint256 &quorumHash, const std::set< uint256 > &proTxHashes)
 
bool isMasternodeQuorumNode (const CNode *pnode)
 
bool isMasternodeQuorumRelayMember (const uint256 &protxHash)
 
bool addPendingMasternode (const uint256 &proTxHash)
 
void addPendingProbeConnections (const std::set< uint256 > &proTxHashes)
 
void setLocalDMN (const uint256 &pro_tx_hash)
 
void clear ()
 
void ThreadOpenMasternodeConnections ()
 
void start (CScheduler &scheduler, const TierTwoConnMan::Options &options)
 
void stop ()
 
void interrupt ()
 

Private Types

typedef std::pair< Consensus::LLMQType, uint256QuorumTypeAndHash
 

Private Member Functions

std::vector< uint256 > vPendingMasternodes GUARDED_BY (cs_vPendingMasternodes)
 
std::map< QuorumTypeAndHash, std::set< uint256 > > masternodeQuorumNodes GUARDED_BY (cs_vPendingMasternodes)
 
std::map< QuorumTypeAndHash, std::set< uint256 > > masternodeQuorumRelayMembers GUARDED_BY (cs_vPendingMasternodes)
 
std::set< uint256 > masternodePendingProbes GUARDED_BY (cs_vPendingMasternodes)
 
Optional< uint256 > local_dmn_pro_tx_hash GUARDED_BY (cs_vPendingMasternodes)
 
void openConnection (const CAddress &addrConnect, bool isProbe)
 
void doMaintenance ()
 

Private Attributes

CThreadInterrupt interruptNet
 
std::thread threadOpenMasternodeConnections
 
RecursiveMutex cs_vPendingMasternodes
 
CConnmanconnman
 

Detailed Description

Definition at line 23 of file net_masternodes.h.

Member Typedef Documentation

◆ QuorumTypeAndHash

Definition at line 83 of file net_masternodes.h.

Constructor & Destructor Documentation

◆ TierTwoConnMan()

TierTwoConnMan::TierTwoConnMan ( CConnman _connman)
explicit

Definition at line 15 of file net_masternodes.cpp.

◆ ~TierTwoConnMan()

TierTwoConnMan::~TierTwoConnMan ( )

Definition at line 16 of file net_masternodes.cpp.

Member Function Documentation

◆ addPendingMasternode()

bool TierTwoConnMan::addPendingMasternode ( const uint256 proTxHash)

Definition at line 140 of file net_masternodes.cpp.

◆ addPendingProbeConnections()

void TierTwoConnMan::addPendingProbeConnections ( const std::set< uint256 > &  proTxHashes)

Definition at line 150 of file net_masternodes.cpp.

◆ clear()

void TierTwoConnMan::clear ( )

Definition at line 156 of file net_masternodes.cpp.

◆ doMaintenance()

void TierTwoConnMan::doMaintenance ( )
private

Definition at line 411 of file net_masternodes.cpp.

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

◆ getQuorumNodes() [1/2]

std::set< uint256 > TierTwoConnMan::getQuorumNodes ( Consensus::LLMQType  llmqType)

Definition at line 29 of file net_masternodes.cpp.

◆ getQuorumNodes() [2/2]

std::set< NodeId > TierTwoConnMan::getQuorumNodes ( Consensus::LLMQType  llmqType,
uint256  quorumHash 
)

Definition at line 42 of file net_masternodes.cpp.

Here is the call graph for this function:

◆ GUARDED_BY() [1/5]

std::vector<uint256> vPendingMasternodes TierTwoConnMan::GUARDED_BY ( cs_vPendingMasternodes  )
private

◆ GUARDED_BY() [2/5]

std::map<QuorumTypeAndHash, std::set<uint256> > masternodeQuorumNodes TierTwoConnMan::GUARDED_BY ( cs_vPendingMasternodes  )
private

◆ GUARDED_BY() [3/5]

std::map<QuorumTypeAndHash, std::set<uint256> > masternodeQuorumRelayMembers TierTwoConnMan::GUARDED_BY ( cs_vPendingMasternodes  )
private

◆ GUARDED_BY() [4/5]

std::set<uint256> masternodePendingProbes TierTwoConnMan::GUARDED_BY ( cs_vPendingMasternodes  )
private

◆ GUARDED_BY() [5/5]

Optional<uint256> local_dmn_pro_tx_hash TierTwoConnMan::GUARDED_BY ( cs_vPendingMasternodes  )
inlineprivate

Definition at line 89 of file net_masternodes.h.

◆ hasQuorumNodes()

bool TierTwoConnMan::hasQuorumNodes ( Consensus::LLMQType  llmqType,
const uint256 quorumHash 
)

Definition at line 62 of file net_masternodes.cpp.

◆ interrupt()

void TierTwoConnMan::interrupt ( )

Definition at line 185 of file net_masternodes.cpp.

◆ isMasternodeQuorumNode()

bool TierTwoConnMan::isMasternodeQuorumNode ( const CNode pnode)

Definition at line 96 of file net_masternodes.cpp.

Here is the call graph for this function:

◆ isMasternodeQuorumRelayMember()

bool TierTwoConnMan::isMasternodeQuorumRelayMember ( const uint256 protxHash)

Definition at line 126 of file net_masternodes.cpp.

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

◆ openConnection()

void TierTwoConnMan::openConnection ( const CAddress addrConnect,
bool  isProbe 
)
private

Definition at line 190 of file net_masternodes.cpp.

Here is the call graph for this function:

◆ removeQuorumNodes()

void TierTwoConnMan::removeQuorumNodes ( Consensus::LLMQType  llmqType,
const uint256 quorumHash 
)

Definition at line 68 of file net_masternodes.cpp.

◆ setLocalDMN()

void TierTwoConnMan::setLocalDMN ( const uint256 pro_tx_hash)
inline

Definition at line 66 of file net_masternodes.h.

◆ setMasternodeQuorumRelayMembers()

void TierTwoConnMan::setMasternodeQuorumRelayMembers ( Consensus::LLMQType  llmqType,
const uint256 quorumHash,
const std::set< uint256 > &  proTxHashes 
)

Definition at line 74 of file net_masternodes.cpp.

Here is the call graph for this function:

◆ setQuorumNodes()

void TierTwoConnMan::setQuorumNodes ( Consensus::LLMQType  llmqType,
const uint256 quorumHash,
const std::set< uint256 > &  proTxHashes 
)

Definition at line 18 of file net_masternodes.cpp.

◆ start()

void TierTwoConnMan::start ( CScheduler scheduler,
const TierTwoConnMan::Options options 
)

Definition at line 165 of file net_masternodes.cpp.

Here is the call graph for this function:

◆ stop()

void TierTwoConnMan::stop ( )

Definition at line 179 of file net_masternodes.cpp.

◆ ThreadOpenMasternodeConnections()

void TierTwoConnMan::ThreadOpenMasternodeConnections ( )

Definition at line 215 of file net_masternodes.cpp.

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

Member Data Documentation

◆ connman

CConnman* TierTwoConnMan::connman
private

Definition at line 92 of file net_masternodes.h.

◆ cs_vPendingMasternodes

RecursiveMutex TierTwoConnMan::cs_vPendingMasternodes
mutableprivate

Definition at line 81 of file net_masternodes.h.

◆ interruptNet

CThreadInterrupt TierTwoConnMan::interruptNet
private

Definition at line 78 of file net_masternodes.h.

◆ threadOpenMasternodeConnections

std::thread TierTwoConnMan::threadOpenMasternodeConnections
private

Definition at line 79 of file net_masternodes.h.


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