@@ -2276,11 +2276,11 @@ bool PeerManagerImpl::AlreadyHave(const CInv& inv)
22762276 case MSG_ISDLOCK:
22772277 return m_llmq_ctx->isman ->AlreadyHave (inv);
22782278 case MSG_DSQ:
2279+ return
22792280#ifdef ENABLE_WALLET
2280- return m_cj_ctx->queueman ->HasQueue (inv.hash ) || (m_active_ctx && m_active_ctx->cj_server ->HasQueue (inv.hash ));
2281- #else
2282- return m_active_ctx && m_active_ctx->cj_server ->HasQueue (inv.hash );
2283- #endif
2281+ (m_cj_ctx->queueman && m_cj_ctx->queueman ->HasQueue (inv.hash )) ||
2282+ #endif // ENABLE_WALLET
2283+ (m_active_ctx && m_active_ctx->cj_server ->HasQueue (inv.hash ));
22842284 }
22852285
22862286
@@ -2885,7 +2885,7 @@ void PeerManagerImpl::ProcessGetData(CNode& pfrom, Peer& peer, const std::atomic
28852885 if (!push && inv.type == MSG_DSQ) {
28862886 auto opt_dsq = m_active_ctx ? m_active_ctx->cj_server ->GetQueueFromHash (inv.hash ) : std::nullopt ;
28872887#ifdef ENABLE_WALLET
2888- if (!opt_dsq.has_value ()) {
2888+ if (m_cj_ctx-> queueman && !opt_dsq.has_value ()) {
28892889 opt_dsq = m_cj_ctx->queueman ->GetQueueFromHash (inv.hash );
28902890 }
28912891#endif
@@ -5273,7 +5273,9 @@ void PeerManagerImpl::ProcessMessage(
52735273 {
52745274 // probably one the extensions
52755275#ifdef ENABLE_WALLET
5276- PostProcessMessage (m_cj_ctx->queueman ->ProcessMessage (pfrom.GetId (), m_connman, *this , msg_type, vRecv), pfrom.GetId ());
5276+ if (m_cj_ctx->queueman ) {
5277+ PostProcessMessage (m_cj_ctx->queueman ->ProcessMessage (pfrom.GetId (), m_connman, *this , msg_type, vRecv), pfrom.GetId ());
5278+ }
52775279 m_cj_ctx->walletman ->ForEachCJClientMan ([this , &pfrom, &msg_type, &vRecv](std::unique_ptr<CCoinJoinClientManager>& clientman) {
52785280 clientman->ProcessMessage (pfrom, m_chainman.ActiveChainstate (), m_connman, m_mempool, msg_type, vRecv);
52795281 });
0 commit comments