LCOV - code coverage report
Current view: top level - src/llmq - context.cpp (source / functions) Hit Total Coverage
Test: test_dash_coverage.info Lines: 16 16 100.0 %
Date: 2026-06-25 07:23:51 Functions: 4 4 100.0 %

          Line data    Source code
       1             : // Copyright (c) 2018-2026 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/context.h>
       6             : 
       7             : #include <bls/bls_worker.h>
       8             : #include <instantsend/instantsend.h>
       9             : #include <llmq/blockprocessor.h>
      10             : #include <llmq/quorumsman.h>
      11             : #include <llmq/signing.h>
      12             : #include <llmq/snapshot.h>
      13             : #include <validation.h>
      14             : 
      15         360 : LLMQContext::LLMQContext(CDeterministicMNManager& dmnman, CEvoDB& evo_db, CSporkManager& sporkman,
      16             :                          ChainstateManager& chainman, const util::DbWrapperParams& db_params, int8_t bls_threads,
      17             :                          int16_t worker_count, int64_t max_recsigs_age) :
      18         180 :     bls_worker{std::make_shared<CBLSWorker>()},
      19         180 :     qsnapman{std::make_unique<llmq::CQuorumSnapshotManager>(evo_db)},
      20         180 :     quorum_block_processor{std::make_unique<llmq::CQuorumBlockProcessor>(chainman.ActiveChainstate(), dmnman, evo_db,
      21         180 :                                                                          *qsnapman, bls_threads)},
      22         360 :     qman{std::make_unique<llmq::CQuorumManager>(*bls_worker, dmnman, evo_db, *quorum_block_processor, *qsnapman,
      23         180 :                                                 chainman, db_params)},
      24         180 :     sigman{std::make_unique<llmq::CSigningManager>(*qman, db_params, max_recsigs_age)},
      25         180 :     isman{std::make_unique<llmq::CInstantSendManager>(sporkman, db_params)}
      26         180 : {
      27             :     // Have to start it early to let VerifyDB check ChainLock signatures in coinbase
      28         180 :     bls_worker->Start(worker_count);
      29         360 : }
      30             : 
      31         360 : LLMQContext::~LLMQContext()
      32         180 : {
      33         180 :     bls_worker->Stop();
      34         360 : }

Generated by: LCOV version 1.16