Wipe llmq db on reindex (#2835)
This commit is contained in:
parent
4af5ea8a7f
commit
0a6416e064
@ -1772,7 +1772,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, &scheduler, false);
|
||||
llmq::InitLLMQSystem(*evoDb, &scheduler, false, fReindex || fReindexChainState);
|
||||
|
||||
if (fReindex) {
|
||||
pblocktree->WriteReindexing(true);
|
||||
|
@ -24,9 +24,9 @@ CBLSWorker* blsWorker;
|
||||
|
||||
CDBWrapper* llmqDb;
|
||||
|
||||
void InitLLMQSystem(CEvoDB& evoDb, CScheduler* scheduler, bool unitTests)
|
||||
void InitLLMQSystem(CEvoDB& evoDb, CScheduler* scheduler, bool unitTests, bool fWipe)
|
||||
{
|
||||
llmqDb = new CDBWrapper(unitTests ? "" : (GetDataDir() / "llmq"), 1 << 20, unitTests);
|
||||
llmqDb = new CDBWrapper(unitTests ? "" : (GetDataDir() / "llmq"), 1 << 20, unitTests, fWipe);
|
||||
blsWorker = new CBLSWorker();
|
||||
|
||||
quorumDKGDebugManager = new CDKGDebugManager(scheduler);
|
||||
|
@ -18,7 +18,7 @@ static const bool DEFAULT_WATCH_QUORUMS = false;
|
||||
extern CDBWrapper* llmqDb;
|
||||
|
||||
// Init/destroy LLMQ globals
|
||||
void InitLLMQSystem(CEvoDB& evoDb, CScheduler* scheduler, bool unitTests);
|
||||
void InitLLMQSystem(CEvoDB& evoDb, CScheduler* scheduler, bool unitTests, bool fWipe = false);
|
||||
void DestroyLLMQSystem();
|
||||
|
||||
// Manage scheduled tasks, threads, listeners etc.
|
||||
|
Loading…
Reference in New Issue
Block a user