diff --git a/src/init.cpp b/src/init.cpp index 45dddfb3e2..041578528f 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1930,8 +1930,15 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc creditPoolManager.reset(new CCreditPoolManager(*node.evodb)); llmq::quorumSnapshotManager.reset(); llmq::quorumSnapshotManager.reset(new llmq::CQuorumSnapshotManager(*node.evodb)); + + if (node.llmq_ctx) { + node.llmq_ctx->Interrupt(); + node.llmq_ctx->Stop(); + } node.llmq_ctx.reset(); node.llmq_ctx.reset(new LLMQContext(chainman.ActiveChainstate(), *node.connman, *node.evodb, *::sporkManager, *node.mempool, node.peerman, false, fReset || fReindexChainState)); + // Have to start it early to let VerifyDB check ChainLock signatures in coinbase + node.llmq_ctx->Start(); if (fReset) { pblocktree->WriteReindexing(true); @@ -2298,8 +2305,6 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc node.scheduler->scheduleEvery(std::bind(&PeriodicStats, std::ref(*node.args), std::cref(*node.mempool)), std::chrono::seconds{nStatsPeriod}); } - node.llmq_ctx->Start(); - // ********************************************************* Step 11: import blocks if (!CheckDiskSpace(GetDataDir())) {