mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Introduce global llmq::llmqDb instance of CDBWrapper
This DB is for LLMQ related data that is not part of on-chain consensus. This for example included LLMQ secret key shares and recovered signatures.
This commit is contained in:
parent
acb52f6ec1
commit
e2cad1bd69
@ -14,6 +14,7 @@
|
||||
#include "quorums_signing.h"
|
||||
#include "quorums_signing_shares.h"
|
||||
|
||||
#include "dbwrapper.h"
|
||||
#include "scheduler.h"
|
||||
|
||||
namespace llmq
|
||||
@ -21,8 +22,12 @@ namespace llmq
|
||||
|
||||
static CBLSWorker blsWorker;
|
||||
|
||||
CDBWrapper* llmqDb;
|
||||
|
||||
void InitLLMQSystem(CEvoDB& evoDb, CScheduler* scheduler, bool unitTests)
|
||||
{
|
||||
llmqDb = new CDBWrapper(unitTests ? "" : (GetDataDir() / "llmq"), 1 << 20, unitTests);
|
||||
|
||||
quorumDKGDebugManager = new CDKGDebugManager(scheduler);
|
||||
quorumBlockProcessor = new CQuorumBlockProcessor(evoDb);
|
||||
quorumDKGSessionManager = new CDKGSessionManager(evoDb, blsWorker);
|
||||
@ -51,6 +56,8 @@ void DestroyLLMQSystem()
|
||||
quorumBlockProcessor = nullptr;
|
||||
delete quorumDKGDebugManager;
|
||||
quorumDKGDebugManager = nullptr;
|
||||
delete llmqDb;
|
||||
llmqDb = nullptr;
|
||||
}
|
||||
|
||||
void StartLLMQSystem()
|
||||
|
@ -5,6 +5,7 @@
|
||||
#ifndef DASH_QUORUMS_INIT_H
|
||||
#define DASH_QUORUMS_INIT_H
|
||||
|
||||
class CDBWrapper;
|
||||
class CEvoDB;
|
||||
class CScheduler;
|
||||
|
||||
@ -14,6 +15,8 @@ namespace llmq
|
||||
// If true, we will connect to all new quorums and watch their communication
|
||||
static const bool DEFAULT_WATCH_QUORUMS = false;
|
||||
|
||||
extern CDBWrapper* llmqDb;
|
||||
|
||||
// Init/destroy LLMQ globals
|
||||
void InitLLMQSystem(CEvoDB& evoDb, CScheduler* scheduler, bool unitTests);
|
||||
void DestroyLLMQSystem();
|
||||
|
Loading…
Reference in New Issue
Block a user