LCOV - code coverage report
Current view: top level - src/coinjoin - walletman.h (source / functions) Hit Total Coverage
Test: total_coverage.info Lines: 1 1 100.0 %
Date: 2026-06-25 07:23:43 Functions: 2 4 50.0 %

          Line data    Source code
       1             : // Copyright (c) 2023-2025 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             : #ifndef BITCOIN_COINJOIN_WALLETMAN_H
       6             : #define BITCOIN_COINJOIN_WALLETMAN_H
       7             : 
       8             : #include <evo/types.h>
       9             : #include <msg_result.h>
      10             : 
      11             : #include <validationinterface.h>
      12             : 
      13             : #include <optional>
      14             : #include <string_view>
      15             : 
      16             : class CBlockIndex;
      17             : class CChainState;
      18             : class CCoinJoinClientManager;
      19             : class CCoinJoinQueue;
      20             : class CConnman;
      21             : class CDataStream;
      22             : class CDeterministicMNManager;
      23             : class ChainstateManager;
      24             : class CMasternodeMetaMan;
      25             : class CMasternodeSync;
      26             : class CNode;
      27             : class CScheduler;
      28             : class CTxMemPool;
      29             : namespace llmq {
      30             : class CInstantSendManager;
      31             : } // namespace llmq
      32             : namespace wallet {
      33             : class CWallet;
      34             : } // namespace wallet
      35             : 
      36             : class CJWalletManager : public CValidationInterface
      37             : {
      38             : public:
      39             :     static std::unique_ptr<CJWalletManager> make(ChainstateManager& chainman, CDeterministicMNManager& dmnman,
      40             :                                                  CMasternodeMetaMan& mn_metaman, CTxMemPool& mempool,
      41             :                                                  const CMasternodeSync& mn_sync, const llmq::CInstantSendManager& isman,
      42             :                                                  bool relay_txes);
      43        2375 :     virtual ~CJWalletManager() = default;
      44             : 
      45             : public:
      46             :     virtual void Schedule(CConnman& connman, CScheduler& scheduler) = 0;
      47             : 
      48             : public:
      49             :     virtual bool hasQueue(const uint256& hash) const = 0;
      50             :     virtual CCoinJoinClientManager* getClient(const std::string& name) = 0;
      51             :     virtual MessageProcessingResult processMessage(CNode& peer, CChainState& chainstate, CConnman& connman,
      52             :                                                    CTxMemPool& mempool, std::string_view msg_type, CDataStream& vRecv) = 0;
      53             :     virtual std::optional<CCoinJoinQueue> getQueueFromHash(const uint256& hash) const = 0;
      54             :     virtual std::optional<int> getQueueSize() const = 0;
      55             :     virtual std::vector<CDeterministicMNCPtr> getMixingMasternodes() = 0;
      56             :     virtual void addWallet(const std::shared_ptr<wallet::CWallet>& wallet) = 0;
      57             :     virtual void removeWallet(const std::string& name) = 0;
      58             :     virtual void flushWallet(const std::string& name) = 0;
      59             : 
      60             : protected:
      61             :     // CValidationInterface
      62             :     virtual void UpdatedBlockTip(const CBlockIndex* pindexNew, const CBlockIndex* pindexFork,
      63             :                                  bool fInitialDownload) override = 0;
      64             : };
      65             : 
      66             : #endif // BITCOIN_COINJOIN_WALLETMAN_H

Generated by: LCOV version 1.16