@@ -62,10 +62,10 @@ class CJWalletManagerImpl final : public CJWalletManager
6262 const CMasternodeSync& m_mn_sync;
6363 const llmq::CInstantSendManager& m_isman;
6464
65- // m_basequeueman is declared before the wallet map so that it is destroyed
65+ // m_queueman is declared before the wallet map so that it is destroyed
6666 // after all CCoinJoinClientManager instances (which hold a raw pointer to it).
6767 // Null when relay_txes is false (no queue processing).
68- const std::unique_ptr<CCoinJoinBaseManager> m_basequeueman ;
68+ const std::unique_ptr<CoinJoinQueueManager> m_queueman ;
6969
7070 mutable Mutex cs_ProcessDSQueue;
7171
@@ -105,7 +105,7 @@ CJWalletManagerImpl::CJWalletManagerImpl(ChainstateManager& chainman, CDetermini
105105 m_mempool{mempool},
106106 m_mn_sync{mn_sync},
107107 m_isman{isman},
108- m_basequeueman {m_relay_txes ? std::make_unique<CCoinJoinBaseManager >() : nullptr }
108+ m_queueman {m_relay_txes ? std::make_unique<CoinJoinQueueManager >() : nullptr }
109109{
110110}
111111
@@ -134,8 +134,8 @@ void CJWalletManagerImpl::UpdatedBlockTip(const CBlockIndex* pindexNew, const CB
134134
135135bool CJWalletManagerImpl::hasQueue (const uint256& hash) const
136136{
137- if (m_basequeueman ) {
138- return m_basequeueman ->HasQueue (hash);
137+ if (m_queueman ) {
138+ return m_queueman ->HasQueue (hash);
139139 }
140140 return false ;
141141}
@@ -149,16 +149,16 @@ CCoinJoinClientManager* CJWalletManagerImpl::getClient(const std::string& name)
149149
150150std::optional<CCoinJoinQueue> CJWalletManagerImpl::getQueueFromHash (const uint256& hash) const
151151{
152- if (m_basequeueman ) {
153- return m_basequeueman ->GetQueueFromHash (hash);
152+ if (m_queueman ) {
153+ return m_queueman ->GetQueueFromHash (hash);
154154 }
155155 return std::nullopt ;
156156}
157157
158158std::optional<int > CJWalletManagerImpl::getQueueSize () const
159159{
160- if (m_basequeueman ) {
161- return m_basequeueman ->GetQueueSize ();
160+ if (m_queueman ) {
161+ return m_queueman ->GetQueueSize ();
162162 }
163163 return std::nullopt ;
164164}
@@ -175,7 +175,7 @@ void CJWalletManagerImpl::addWallet(const std::shared_ptr<wallet::CWallet>& wall
175175 LOCK (cs_wallet_manager_map);
176176 m_wallet_manager_map.try_emplace (wallet->GetName (),
177177 std::make_unique<CCoinJoinClientManager>(wallet, m_dmnman, m_mn_metaman, m_mn_sync,
178- m_isman, m_basequeueman .get ()));
178+ m_isman, m_queueman .get ()));
179179}
180180
181181void CJWalletManagerImpl::flushWallet (const std::string& name)
@@ -193,8 +193,8 @@ void CJWalletManagerImpl::removeWallet(const std::string& name)
193193
194194void CJWalletManagerImpl::DoMaintenance (CConnman& connman)
195195{
196- if (m_basequeueman && m_mn_sync.IsBlockchainSynced () && !ShutdownRequested ()) {
197- m_basequeueman ->CheckQueue ();
196+ if (m_queueman && m_mn_sync.IsBlockchainSynced () && !ShutdownRequested ()) {
197+ m_queueman ->CheckQueue ();
198198 }
199199 LOCK (cs_wallet_manager_map);
200200 for (auto & [_, clientman] : m_wallet_manager_map) {
@@ -209,7 +209,7 @@ MessageProcessingResult CJWalletManagerImpl::processMessage(CNode& pfrom, CChain
209209 ForEachCJClientMan ([&](CCoinJoinClientManager& clientman) {
210210 clientman.ProcessMessage (pfrom, chainstate, connman, mempool, msg_type, vRecv);
211211 });
212- if (m_basequeueman ) {
212+ if (m_queueman ) {
213213 return ProcessDSQueue (pfrom.GetId (), connman, msg_type, vRecv);
214214 }
215215 return {};
@@ -218,7 +218,7 @@ MessageProcessingResult CJWalletManagerImpl::processMessage(CNode& pfrom, CChain
218218MessageProcessingResult CJWalletManagerImpl::ProcessDSQueue (NodeId from, CConnman& connman, std::string_view msg_type,
219219 CDataStream& vRecv)
220220{
221- assert (m_basequeueman );
221+ assert (m_queueman );
222222
223223 if (msg_type != NetMsgType::DSQUEUE) {
224224 return {};
@@ -251,9 +251,9 @@ MessageProcessingResult CJWalletManagerImpl::ProcessDSQueue(NodeId from, CConnma
251251 {
252252 LOCK (cs_ProcessDSQueue);
253253
254- if (m_basequeueman ->HasQueue (dsq.GetHash ())) return ret;
254+ if (m_queueman ->HasQueue (dsq.GetHash ())) return ret;
255255
256- if (m_basequeueman ->HasQueueFromMasternode (dsq.masternodeOutpoint , dsq.fReady )) {
256+ if (m_queueman ->HasQueueFromMasternode (dsq.masternodeOutpoint , dsq.fReady )) {
257257 // no way the same mn can send another dsq with the same readiness this soon
258258 LogPrint (BCLog::COINJOIN, /* Continued */
259259 " DSQUEUE -- Peer %d is sending WAY too many dsq messages for a masternode with collateral %s\n " ,
@@ -298,7 +298,7 @@ MessageProcessingResult CJWalletManagerImpl::ProcessDSQueue(NodeId from, CConnma
298298 ForAnyCJClientMan (
299299 [&dsq](CCoinJoinClientManager& clientman) { return clientman.MarkAlreadyJoinedQueueAsTried (dsq); });
300300
301- m_basequeueman ->AddQueue (dsq);
301+ m_queueman ->AddQueue (dsq);
302302 }
303303 } // cs_ProcessDSQueue
304304 return ret;
0 commit comments