Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

quorums_init.cpp
Go to the documentation of this file.
1 // Copyright (c) 2018-2019 The Dash Core developers
2 // Distributed under the MIT/X11 software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #include <llmq/quorums_init.h>
6 
7 #include <llmq/quorums.h>
11 #include <llmq/quorums_debug.h>
14 #include <llmq/quorums_signing.h>
16 
17 #include <dbwrapper.h>
18 
19 namespace llmq
20 {
21 
23 
25 
26 void InitLLMQSystem(CEvoDB& evoDb, bool unitTests, bool fWipe)
27 {
28  llmqDb = new CDBWrapper(unitTests ? "" : (GetDataDir() / "llmq"), 1 << 20, unitTests, fWipe);
29  blsWorker = new CBLSWorker();
30 
36  quorumSigningManager = new CSigningManager(*llmqDb, unitTests);
39 }
40 
42 {
44  quorumInstantSendManager = nullptr;
45  delete chainLocksHandler;
46  chainLocksHandler = nullptr;
47  delete quorumSigningManager;
48  quorumSigningManager = nullptr;
50  quorumSigSharesManager = nullptr;
51  delete quorumManager;
52  quorumManager = nullptr;
54  quorumDKGSessionManager = nullptr;
55  delete quorumBlockProcessor;
56  quorumBlockProcessor = nullptr;
57  delete quorumDKGDebugManager;
58  quorumDKGDebugManager = nullptr;
59  delete blsWorker;
60  blsWorker = nullptr;
61  delete llmqDb;
62  llmqDb = nullptr;
63 }
64 
66 {
68 
69  if (blsWorker) {
70  blsWorker->Start();
71  }
74  }
78  }
79  if (chainLocksHandler) {
81  }
84  }
85 }
86 
88 {
91  }
92  if (chainLocksHandler) {
94  }
98  }
101  }
102  if (blsWorker) {
103  blsWorker->Stop();
104  }
105 }
106 
108 {
111  }
114  }
115 }
116 
117 } // namespace llmq
CSigSharesManager * quorumSigSharesManager
Definition: evodb.h:32
void StartLLMQSystem()
CDKGSessionManager * quorumDKGSessionManager
CQuorumBlockProcessor * quorumBlockProcessor
CBLSWorker * blsWorker
std::unique_ptr< CEvoDB > evoDb
Definition: evodb.cpp:7
void InitLLMQSystem(CEvoDB &evoDb, bool unitTests, bool fWipe)
CQuorumManager * quorumManager
Definition: quorums.cpp:30
CInstantSendManager * quorumInstantSendManager
The quorum manager maintains quorums which were mined on chain.
Definition: quorums.h:81
CChainLocksHandler * chainLocksHandler
void Stop()
Definition: bls_worker.cpp:69
CDKGDebugManager * quorumDKGDebugManager
void Start()
Definition: bls_worker.cpp:61
void StopLLMQSystem()
void InterruptLLMQSystem()
CSigningManager * quorumSigningManager
CDBWrapper * llmqDb
const fs::path & GetDataDir(bool fNetSpecific)
Definition: util.cpp:928
void DestroyLLMQSystem()
Released under the MIT license