![]() |
PIVX Core
5.6.99
P2P Digital Currency
|
Handles multiple sequential sessions of one specific LLMQ type. More...
#include <quorums_dkgsessionhandler.h>
Classes | |
| struct | QuorumPhaseAndHash |
Public Member Functions | |
| CDKGSessionHandler (const Consensus::LLMQParams &_params, CBLSWorker &blsWorker, CDKGSessionManager &_dkgManager) | |
| ~CDKGSessionHandler () | |
| void | UpdatedBlockTip (const CBlockIndex *pindexNew) |
| void | ProcessMessage (CNode *pfrom, const std::string &strCommand, CDataStream &vRecv) |
| void | StartThread () |
| void | StopThread () |
Private Types | |
| typedef std::function< void()> | StartPhaseFunc |
| typedef std::function< bool()> | WhileWaitFunc |
Private Member Functions | |
| bool | InitNewQuorum (const CBlockIndex *pindexQuorum) |
| QuorumPhaseAndHash | GetPhaseAndQuorumHash () const |
| void | WaitForNextPhase (QuorumPhase curPhase, QuorumPhase nextPhase, const uint256 &expectedQuorumHash, const WhileWaitFunc &runWhileWaiting) |
| void | WaitForNewQuorum (const uint256 &oldQuorumHash) |
| void | SleepBeforePhase (QuorumPhase curPhase, const uint256 &expectedQuorumHash, double randomSleepFactor, const WhileWaitFunc &runWhileWaiting) |
| void | HandlePhase (QuorumPhase curPhase, QuorumPhase nextPhase, const uint256 &expectedQuorumHash, double randomSleepFactor, const StartPhaseFunc &startPhaseFunc, const WhileWaitFunc &runWhileWaiting) |
| void | HandleDKGRound () |
| void | PhaseHandlerThread () |
Private Attributes | |
| RecursiveMutex | cs |
| std::atomic< bool > | stopRequested {false} |
| const Consensus::LLMQParams & | params |
| CBLSWorker & | blsWorker |
| CDKGSessionManager & | dkgManager |
| QuorumPhase | phase {QuorumPhase_Idle} |
| int | currentHeight {-1} |
| int | quorumHeight {-1} |
| uint256 | quorumHash {UINT256_ZERO} |
| std::shared_ptr< CDKGSession > | curSession |
| std::thread | phaseHandlerThread |
| CDKGPendingMessages | pendingContributions |
| CDKGPendingMessages | pendingComplaints |
| CDKGPendingMessages | pendingJustifications |
| CDKGPendingMessages | pendingPrematureCommitments |
Friends | |
| class | CDKGSessionManager |
Handles multiple sequential sessions of one specific LLMQ type.
There is one instance of this class per LLMQ type.
It internally starts the phase handler thread, which constantly loops and sequentially processes one session at a time and waiting for the next phase if necessary.
Definition at line 94 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 137 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 138 of file quorums_dkgsessionhandler.h.
| llmq::CDKGSessionHandler::CDKGSessionHandler | ( | const Consensus::LLMQParams & | _params, |
| CBLSWorker & | blsWorker, | ||
| CDKGSessionManager & | _dkgManager | ||
| ) |
Definition at line 87 of file quorums_dkgsessionhandler.cpp.
| llmq::CDKGSessionHandler::~CDKGSessionHandler | ( | ) |
Definition at line 102 of file quorums_dkgsessionhandler.cpp.
|
private |
Definition at line 181 of file quorums_dkgsessionhandler.cpp.
|
private |
Definition at line 500 of file quorums_dkgsessionhandler.cpp.
|
private |
Definition at line 318 of file quorums_dkgsessionhandler.cpp.
|
private |
Definition at line 162 of file quorums_dkgsessionhandler.cpp.
|
private |
Definition at line 583 of file quorums_dkgsessionhandler.cpp.
| void llmq::CDKGSessionHandler::ProcessMessage | ( | CNode * | pfrom, |
| const std::string & | strCommand, | ||
| CDataStream & | vRecv | ||
| ) |
Definition at line 130 of file quorums_dkgsessionhandler.cpp.
|
private |
Definition at line 250 of file quorums_dkgsessionhandler.cpp.
| void llmq::CDKGSessionHandler::StartThread | ( | ) |
Definition at line 144 of file quorums_dkgsessionhandler.cpp.
| void llmq::CDKGSessionHandler::StopThread | ( | ) |
Definition at line 154 of file quorums_dkgsessionhandler.cpp.
| void llmq::CDKGSessionHandler::UpdatedBlockTip | ( | const CBlockIndex * | pindexNew | ) |
Definition at line 106 of file quorums_dkgsessionhandler.cpp.
|
private |
Definition at line 231 of file quorums_dkgsessionhandler.cpp.
|
private |
Definition at line 190 of file quorums_dkgsessionhandler.cpp.
|
friend |
Definition at line 97 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 103 of file quorums_dkgsessionhandler.h.
|
mutableprivate |
Definition at line 99 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 107 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 110 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 104 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 102 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 114 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 113 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 115 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 116 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 106 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 111 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 109 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 108 of file quorums_dkgsessionhandler.h.
|
private |
Definition at line 100 of file quorums_dkgsessionhandler.h.