Skip to content

Commit

Permalink
Pass scheduler to InitLLMQSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
codablock committed Jan 9, 2019
1 parent a1f4853 commit 098b094
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1747,7 +1747,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
pcoinsdbview = new CCoinsViewDB(nCoinDBCache, false, fReindex || fReindexChainState);
pcoinscatcher = new CCoinsViewErrorCatcher(pcoinsdbview);
pcoinsTip = new CCoinsViewCache(pcoinscatcher);
llmq::InitLLMQSystem(*evoDb);
llmq::InitLLMQSystem(*evoDb, &scheduler);

if (fReindex) {
pblocktree->WriteReindexing(true);
Expand Down
4 changes: 3 additions & 1 deletion src/llmq/quorums_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
#include "quorums_commitment.h"
#include "quorums_dkgsessionmgr.h"

#include "scheduler.h"

namespace llmq
{

static CBLSWorker blsWorker;

void InitLLMQSystem(CEvoDB& evoDb)
void InitLLMQSystem(CEvoDB& evoDb, CScheduler* scheduler)
{
quorumBlockProcessor = new CQuorumBlockProcessor(evoDb);
quorumDKGSessionManager = new CDKGSessionManager(evoDb, blsWorker);
Expand Down
3 changes: 2 additions & 1 deletion src/llmq/quorums_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
#define DASH_QUORUMS_INIT_H

class CEvoDB;
class CScheduler;

namespace llmq
{

// If true, we will connect to all new quorums and watch their communication
static const bool DEFAULT_WATCH_QUORUMS = false;

void InitLLMQSystem(CEvoDB& evoDb);
void InitLLMQSystem(CEvoDB& evoDb, CScheduler* scheduler);
void DestroyLLMQSystem();

}
Expand Down
2 changes: 1 addition & 1 deletion src/qt/test/rpcnestedtests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void RPCNestedTests::rpcNestedTests()
pcoinsdbview = new CCoinsViewDB(1 << 23, true);
deterministicMNManager = new CDeterministicMNManager(*evoDb);

llmq::InitLLMQSystem(*evoDb);
llmq::InitLLMQSystem(*evoDb, nullptr);

pcoinsTip = new CCoinsViewCache(pcoinsdbview);
InitBlockIndex(chainparams);
Expand Down
2 changes: 1 addition & 1 deletion src/test/test_dash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha
mempool.setSanityCheck(1.0);
pblocktree = new CBlockTreeDB(1 << 20, true);
pcoinsdbview = new CCoinsViewDB(1 << 23, true);
llmq::InitLLMQSystem(*evoDb);
llmq::InitLLMQSystem(*evoDb, nullptr);
pcoinsTip = new CCoinsViewCache(pcoinsdbview);
InitBlockIndex(chainparams);
{
Expand Down

0 comments on commit 098b094

Please sign in to comment.